Search for question
Question

This assignment consists to two parts:

In the first part you will compile and run the Array class implementation that is posted in the week 5 module. The Array class implements range checking to ensure that subscripts remain within the bounds of the Array. The class allows one array object to be assigned to another with the assignment operator. There is no need to pass the array size separately to functions that receive array parameters. Entire Arrays can be input or output using the stream insertion (>>) and stream extraction (<<) operators. You can compare Arrays with the equality operator (==). It is a powerful Array class.

Check the results and post them on Canvas.

The second part of the assignment has to do with duplicate elimination in an array of integers. Use a one-dimensional built-in array to solve the following problem. Read in 20 numbers, each of which is between 20 and 100 inclusive. As each number is read, validate it and store it in the array only if it isn’t a duplicate of a number already read. After reading all the values, display only the unique values that the user entered. Provide for the “worst case” in which all 20 numbers are different. Use the smallest array to solve this problem.

Post the source files and the result on Canvas.