Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, Please help write GradeCalculator program in JAVA which does the following: 1) Prompts the user for 5 test scores as integers greater than or

Hello,

Please help write GradeCalculator program in JAVA which does the following:

1) Prompts the user for 5 test scores as integers greater than or equal to zero and less than or equal to 100.

2) Ensures that the user entries are valid (integers greater than or equal to zero and less than or equal to 100).

3) Stores the 5 tests scores in an array.

4) Uses the bubble sort to sort the scores in ascending order.

5) Calculates the letter grade for each test

6) Displays the letter grade of each score as well as the overall average (the average of the 5 tests).

SPECIFIC REQUIREMENTS (IMPORTANT):

You must include a method called calcAverage to compute the average of the 5 test scores; it takes an array of type int as a parameter and returns the average.

You must include a method called validateUserInput to ensure user entries are integers greater than or equal to zero and less than or equal to 100.

You must include a method called bubbleSort which sorts the values (test scores) stored in the array in ascending order.

You must include a method called displayTestScores which displays each test score and its corresponding letter, as well as the overall average.

You must include a method determineGrade to compute the average of the 5 test scores; it takes an int array with the test scores and a char array to store the corresponding letter grades. The letter grade is arrived at using the table below:

score

Letter Grade

>=90

A

>=80 and

B

>=70 and

C

>=60 and

D

>=0 and

F

SCREENSHOTS OF PROGRAM FLOW:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Enter score 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions