Question: Problem Description: Write a program that generates 100 random integers between 0 and 9 and displays the count for each number. *** Hint: Use

Problem Description: Write a program that generates 100 random integers between 0 and 9 and displays the  2. Maximum number (15 pts) Problem Description: Write a method that finds the maximum element in an array of

Problem Description: Write a program that generates 100 random integers between 0 and 9 and displays the count for each number. *** Hint: Use an array of ten integers, say counts, to store the counts for the number of Os, 1s. ..., 9s. The program must then ask if the user wants to continue with another run. If the user enters "y", the program will start a new conversion. Otherwise, it'll stop. Sample run: (red indicates user's inputs) This program generates 100 random integers between 0 and 9 and displays the count for each number Number of 0s is 9 Number of is is 7 Number of 2s is 8 Number of 3s is 8 Number of 4s is 8 Number of 5s is 14 Number of 6s is 10 Number of 7s is 9 Number of 8s is 6 Number of 9s is 21 Continue? (y/n) ycenter icon> Number of Os is 10 Number of is is 4 Number of 2s is 7 Number of 3s is 16 Number of 4s is 6 Number of 5s is 12 Number of 6s is 9 Number of 7s is 9 Number of 8s is 11 Number of 9s is 16 Continue? (y/n) n Good bye! ***Notes: The count of each number can be different each time the program runs as the integers were generated randomly. 2. Maximum number (15 pts) Problem Description: Write a method that finds the maximum element in an array of double val- ues using the following header: public static double max(double[] array) Write a test program that prompts the user to enter ten numbers, invokes this method to return the maximum value, and displays the maximum value. The program must then ask if the user wants to continue with another array of numbers. If the user enters "y", the program will start a new conversion. Other- wise, it'll stop. Sample run: (red indicates user's inputs) Enter 10 numbers for the array, separated by spaces: 12 2.3 4.5 21.7 2 45.1 87.4 20.3 38 21.3 The maximum element of the array is 87.4 Continue? (y/n) y Enter 10 numbers for the array, separated by spaces: 43.5 26.4 32.1 99 32.9 50.1 45 20.7 83.5 12.8 The maximum element of the array is 99.0 Continue? (y/n) n Good bye!

Step by Step Solution

3.49 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Python program that generates 100 random integers between 0 and 9 counts the occurrences of ... View full answer

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 Programming Questions!