Question: Using Java, write a GPA Calculator using methods Your program should have the following items: a. There should be the following two methods and both

Using Java, write a GPA Calculator using methods

Your program should have the following items:

a. There should be the following two methods and both these methods should be called from (i.e., within) the main method.

Output: this method takes a string message as a parameter and outputs it on System.out. Output does not return anything.

GPACalculator: this method takes no parameter and returns a GPA value (of type double). It should prompt the user to enter information about 4 different courses and compute the GPA over these courses: The GPA is computed using these information: a grade (A, B, C, D, or F) and a corresponding number of credit hours

final_gpa = (1st grade*1st hour+..+4th grade*4th hour)/4.00

GPACalculator must call the method Output to prompt the user for inserting the GPAs.

b. You should use if-then-else-if statements (or switch as appropriate) in both your main method and your GPACalculator method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!