Question: Done in Java. Any help is greatly appreciated!! Note: No arrays or any other data structure (arraylist, hashmap, sets, linkedlist, stacks, queue) is allowed You

Done in Java. Any help is greatly appreciated!!

Note:

No arrays or any other data structure (arraylist, hashmap, sets, linkedlist, stacks, queue) is allowed

You can not use the string split function to extract elements from the string, you have to figure out a way to iterate through the string and extract the numbers.

You have to use java's default random method generator to generate random numbers.

Done in Java. Any help is greatly appreciated!! Note: No arrays or

3. 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 (except the last number). In the end give the user: (1) a count of total random numbers entered, (2) a count of unique random numbers, (3) a frequency of each random numbers entered. Also remove the random number with the median frequency from your string. Print the original input string and the new string after removing the above-mentioned number. Note: If two or more numbers have the same frequency then just delete the larger number. For example if number '2' and number '3' both have median frequency of 2 then delete the number '3' from the string. Input Random Numbers = 1,1,2,4,5,6,6,2,1,2 Total Numbers Entered = 10 Total Unique Numbers = 5 Frequency: 1 -> 2 2->3 3-> 1 5 -> 1 6->2 Deleting the Numbers with Median Frequency. Final Random Numbers = 1,1,2,4,5,2,1,2

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!