[0] 51 [1] e [2] 91 [3] 8 [4] 96 [5] 11 [6] 74 [7] 27 [8] 80 [9] 20 The minimum value : 0 The maximum value : 96

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Modularization Techniques
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question
Exam Scores
[0]
[1]
[2]
[3]
[4]
[5]
[6] 74
[7] 27
[8] 80
[9] 20
The minimum value : 0
The maximum value : 96
The total is
The average is
Number of A's
Number of B's
51
91
8
96
11
: 458
: 45.8
: 2
: 1
Sorry, you DO NOT have a perfect exam score.
Please enter Y to continue and N to quit: y
Exam Scores
[0] 59
[1] 75
[2] 91
[3]
[4] 45
[5] 85
[6] 12
[7]
[8] 84
[9] 68
The minimum value : 12
The maximum value : 91
The total is
The average is
Number of A's
50
82
:651
: 65.1
: 1
: 3
Sorry, you DO NOT have a perfect exam score.
Number of B's
Please enter Y to continue and N to quit: n
Goodbye!
Transcribed Image Text:Exam Scores [0] [1] [2] [3] [4] [5] [6] 74 [7] 27 [8] 80 [9] 20 The minimum value : 0 The maximum value : 96 The total is The average is Number of A's Number of B's 51 91 8 96 11 : 458 : 45.8 : 2 : 1 Sorry, you DO NOT have a perfect exam score. Please enter Y to continue and N to quit: y Exam Scores [0] 59 [1] 75 [2] 91 [3] [4] 45 [5] 85 [6] 12 [7] [8] 84 [9] 68 The minimum value : 12 The maximum value : 91 The total is The average is Number of A's 50 82 :651 : 65.1 : 1 : 3 Sorry, you DO NOT have a perfect exam score. Number of B's Please enter Y to continue and N to quit: n Goodbye!
Chapter 7 Program 1: StatsArray.java (a
Please adhere to the Standards for Programming Assignments and the Java Coding Guidelines
Write a program that instantiates an array of integers named scores. Let the size of the array be
10. The program then first invokes randomFill to fill the scores array with random numbers in the
range of 0-100. Once the array is filled with data, the methods below are called such that the
output resembles the expected output given.
The program keeps prompting the user to see if they want to evaluate a new set of random data.
Find below the names of methods and their description.
Hint: All methods are static and they will be in StatsArray.java under the main method. Please
check out the static method demo before start working on this assignment.
O public static void randomFill (int [] data)
This method fills an array with random numbers in the range of 0-100
O public static int getTotal (int [] data)
This method calculates, and returns the total of all values in the array
O public static double getävg(int[] data)
This method returns the average of the values in the array
O public static int getLargest(int [] data)
This method finds and returns the largest value in the array
O public static int getSmallest (int ] data)
This method finds and returns the smallest value in the array
O public static int findLetterGrade (int lowRange, int highRange,
int [] data )
The method counts and returns the number of values between the given range inclusive.
O publicstatic boolean isNumberFound (int someNumber, int 1 data )
This method returns true if the array contains someNumber, return false otherwise.
O public statio void displayData (int [] data)
This method displays the array with index in [] as shown in the given output.
Hint: In order to get number of A's the range will be between 90-100 inclusive and for the
number of B's the range will be between 80-89 inclusive
Expected Output:
Transcribed Image Text:Chapter 7 Program 1: StatsArray.java (a Please adhere to the Standards for Programming Assignments and the Java Coding Guidelines Write a program that instantiates an array of integers named scores. Let the size of the array be 10. The program then first invokes randomFill to fill the scores array with random numbers in the range of 0-100. Once the array is filled with data, the methods below are called such that the output resembles the expected output given. The program keeps prompting the user to see if they want to evaluate a new set of random data. Find below the names of methods and their description. Hint: All methods are static and they will be in StatsArray.java under the main method. Please check out the static method demo before start working on this assignment. O public static void randomFill (int [] data) This method fills an array with random numbers in the range of 0-100 O public static int getTotal (int [] data) This method calculates, and returns the total of all values in the array O public static double getävg(int[] data) This method returns the average of the values in the array O public static int getLargest(int [] data) This method finds and returns the largest value in the array O public static int getSmallest (int ] data) This method finds and returns the smallest value in the array O public static int findLetterGrade (int lowRange, int highRange, int [] data ) The method counts and returns the number of values between the given range inclusive. O publicstatic boolean isNumberFound (int someNumber, int 1 data ) This method returns true if the array contains someNumber, return false otherwise. O public statio void displayData (int [] data) This method displays the array with index in [] as shown in the given output. Hint: In order to get number of A's the range will be between 90-100 inclusive and for the number of B's the range will be between 80-89 inclusive Expected Output:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Troubleshooting
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage