Using good OOP, write a C++ program that will compare two arrays to test for the same elements and multiplicity. To begin, populate the arrays with the input files, comFile1.txt and comFile2.txt. The elements in the arrays do not need to be in the same order for them to be considered similar. For example: comFile1.txt TO array 1: 121 144 19 161 19 144 19 11 comFile2.txt TO array 2: 11 121 144 19 161 19 144 19 would be considered to have the same elements because 19 appears 3 times in each array, 144 appears twice in each array, and all other elements appear once in each array. Use pointer notation instead of array notation whenever possible. Display whether or not the arrays have the same elements and multiplicity. Use private member functions and variables. Use public member functions for a constructor (where appropriate) and a driver method only. These specifications do not give a list of method names to be used. It is assumed the program will use several methods doing one task each.
Using good OOP, write a C++ program that will compare two arrays to test for the same elements and multiplicity. To begin, populate the arrays with the input files, comFile1.txt and comFile2.txt. The elements in the arrays do not need to be in the same order for them to be considered similar. For example:
comFile1.txt TO array 1: 121 144 19 161 19 144 19 11
comFile2.txt TO array 2: 11 121 144 19 161 19 144 19
would be considered to have the same elements because 19 appears 3 times in each array, 144 appears twice in each array, and all other elements appear once in each array.
Use pointer notation instead of array notation whenever possible.
Display whether or not the arrays have the same elements and multiplicity.
Use private member functions and variables.
Use public member functions for a constructor (where appropriate) and a driver method only.
These specifications do not give a list of method names to be used. It is assumed the program will use several methods doing one task each.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images