Question: **7.5 Use of a Unidirectional Array ( 10 points ): Write a Java program FilterDuplicates.java that reads in ten numbers. The numbers could be completely

**7.5 Use of a Unidirectional Array (10 points): Write a Java program FilterDuplicates.java that reads in ten numbers. The numbers could be completely distinct or there could be duplicates of some number or numbers. There should be no rule on how many duplicates - so, dont assume fixed number/s. The program should read these numbers and then display the number of distinct numbers discounting the duplicates. So, in case a number appears multiple times, your program should display that number only once. You can use an array to do this. While your program reads the numbers, it can keep storing them to an array if a number read in is new. If the number is already in the array, your program can ignore it. Finally, print the number of unique numbers and the array of numbers itself.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!