Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program called printGPA. The program should contain at least 3 methods: main, gradeAverage, and letterGrade. The user will type a line of input

Write a program called printGPA. The program should contain at least 3 methods: main, gradeAverage, and letterGrade.

The user will type a line of input containing the student's name, then a number that represents the number of scores, followed by that many integer scores (user input is in bold below). The data type used for the input should be one of the primitive integer data types. Here are two example dialogues:

Enter a student record: Maria 5 72 91 84 89 78

Maria's grade is 82.8.

Maria's final letter grade is B.

Enter a student record: Jordan 4 86 71 62 90

Jordan's grade is 77.25. Jordans final letter grade is C.

The method gradeAverage accepts a Scanner for the console parameter and then calculates and returns the student's grade point average. The method letterGrade takes one parameter, the students grade point average and then computes and returns the students final letter grade. The students final letter grade is based on the following table:

Grade Point Average

Letter Grade

90100

A

8089

B

7079

C

6069

D

Below 60

F

gradeAverage and letterGrade should not contain any System.out.print statements. The output should be formatted so the average does not contain more than 2 decimal places.

If you would like to earn bonus points, throw out the lowest score when computing average. For example, Jordans final average would be:

Jordan's grade is 82.33 because the students average of (86 + 71 + 90) / 3 equals 82.33. Jordans lowest score was 62 and was thrown out.

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

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions