Question: java use Junit4 test the result have to as same as : Random Numbers = 1,1,2,4,5,6,6,2,1,2 Frequency: 1 -> 2 2 -> 3 3 ->

java use Junit4 test the result have to as same as :java

use Junit4 test

the result have to as same as :

Random Numbers = 1,1,2,4,5,6,6,2,1,2

Frequency:

1 -> 2 2 -> 3

3 -> 1 5 -> 1 6 -> 2

Deleting the Numbers with Max Frequency..

Random Numbers = 1,1,4,5,6,6,1

thank you so much

Write a java program to generate 10 random numbers between 1 and 10. As you generate each number, keep appending it to a string with a comma after each number. In the end give the user a count of each random number in the string and remove the random number with the highest frequency from your string. Note: If two or more numbers have the same frequency then just delete the smallest number. For example if number '2' and number '3' both have frequency of 2 then delete the number '2' from the string. Random Numbers = 1,1,2,4,5,6,6,2,1,2 Frequency: 1 -> 2 2 -> 3 3 -> 1 5 -> 1 6 -> 2 Deleting the Numbers with Max Frequency.. Random Numbers = 1,1,4,5,6,6,1

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!