Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA Design and implement a program (name it AssignGrades) that stores and processes numeric scores for a class. The program prompts the users to

IN JAVA Design and implement a program (name it AssignGrades) that stores and processes numeric scores for a class. The program prompts the users to enter the class size (number of students) to create a single-dimensional array of that size to store the scores. The program prompts the user to enter a valid integer score (between 0 and 100) for each student. The program validates entered scores, rejects invalid scores, and stores only valid scores in the array. The program defines method printGrades() that takes a signal-dimensional array of integer scores as a parameter and processes the scores to print letter grades based on the following scale

Grade is A if score >= 90 and score <= 100

Grade is B if score >= 80 and score <= 89

Grade is C if score >= 70 and score <= 79

Grade is D if score >= 60 and score <= 69

Grade is F if score < 60

Document your code and organized your output following these sample runs.

Sample run 1:

Class size: 5

Entered grades: 90, 67, 78, 89, 60

Student 0 score is 90 and grade is A

Student 1 score is 67 and grade is D

Student 2 score is 78 and grade is C

Student 3 score is 89 and grade is B

Student 4 score is 60 and grade is D

Sample run 2:

Class size: 3

Entered grades: 77, 50, 81

Student 0 score is 77 and grade is C

Student 1 score is 50 and grade is F

Student 2 score is 81 and grade is B

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

Students also viewed these Databases questions