Modify Lab 5a to make use of Arrays for storing, calculating and printing the counters and percentages for the letter-grade categories. Create numeric arrays (integer or double) for the letter-grade category counters and percentage calculations. Create a String array to store the printed letter-grade descriptions. (For example: “A grades (90 – 100):”) Lab 5b should create the same results as 5a. The program should ask the user to enter a list of exam scores given as integer percentages in the range of 0 to 100. The user should indicate the end of the list by entering a sentinel value of -1. The program should include a loop for inputting the values. Within the loop, the program should count the total number of scores entered and accumulate an overall total of the scores. Decision statements should be used to determine the number of scores entered for each letter grade category (as shown below) and increment the correct counter array location. Keep track of the lowest and highest score entered, as well. After the loop is completed, the program should use a for loop to calculate the percentage of grades entered in each letter-grade counter array location and store the percentages in the corresponding percentage array location. The overall average should also be calculated. The test input and results should be similar to that shown below, including the spacing between lines, and aligning the columns. The grade-letter category percentage must be rounded to a whole number and the overall average percentage must be rounded to 1 decimal place. Use a for loop to print the lines depicting the letter-grade categories, counters and percentages. Sample program execution: Please enter a list of exam grades. End the list by entering a -1. 85 50 98 72 86 63 85 78 70 72 87 72 66 73 -1 There were 14 grades entered as follows: A grades (90 – 100): 1 or 7% B grades (80 – 89): 4 or 29% C grades (70 – 79): 6 or 43% D grades (60 – 69): 2 or 14% F grades (0 – 59): 1 or 7% The scores ranged from 50 to 98 The overall average was 75.5

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please can you write the answer in java code. 

Modify Lab 5a to make use of Arrays for storing, calculating and printing the counters
and percentages for the letter-grade categories.
Create numeric arrays (integer or double) for the letter-grade category counters and
percentage calculations.
Create a String array to store the printed letter-grade descriptions. (For example: “A
grades (90 – 100):”)
Lab 5b should create the same results as 5a. The program should ask the user to enter a
list of exam scores given as integer percentages in the range of 0 to 100. The user should
indicate the end of the list by entering a sentinel value of -1. The program should
include a loop for inputting the values. Within the loop, the program should count the
total number of scores entered and accumulate an overall total of the scores. Decision
statements should be used to determine the number of scores entered for each letter
grade category (as shown below) and increment the correct counter array location.
Keep track of the lowest and highest score entered, as well.
After the loop is completed, the program should use a for loop to calculate the
percentage of grades entered in each letter-grade counter array location and store the
percentages in the corresponding percentage array location. The overall average should
also be calculated.
The test input and results should be similar to that shown below, including the spacing
between lines, and aligning the columns. The grade-letter category percentage must be
rounded to a whole number and the overall average percentage must be rounded to 1
decimal place. Use a for loop to print the lines depicting the letter-grade categories,
counters and percentages.


Sample program execution:
Please enter a list of exam grades. End the list by entering a -1.
85 50 98 72 86 63 85 78 70 72 87 72 66 73 -1
There were 14 grades entered as follows:
A grades (90 – 100): 1 or 7%
B grades (80 – 89): 4 or 29%
C grades (70 – 79): 6 or 43%
D grades (60 – 69): 2 or 14%
F grades (0 – 59): 1 or 7%
The scores ranged from 50 to 98
The overall average was 75.5
S

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY