Question: Question 22 Instructions In this question you will write a program that calculates the grade point average (GPA) of a student. Assume that a student's
Question 22 Instructions In this question you will write a program that calculates the grade point average (GPA) of a student. Assume that a student's grades are entered as a string of characters with no space between them (for example ABAC), and the following standard policy is used to convert a letter grade to a numerical value: Grade Points A 4.0 B 3.0 C 2.0 D 1.0 F 0.0 The GPA of a student is the average of the converted numerical points. Write a program that reads a student's letter grades as a string of characters with no space in between, and calculates the GPA of the student. If the input string contains a letter other than 'A', 'B', 'C', 'D', or 'F', your program should output an error message. The following are a few sample runs: Please enter your grades: ABCB Your GPA is 3.0 Please enter your grades: ABAB Your GPA is 3.5 Please enter your grades: ABT Invalid input. Each grade must be A, B, C, D or F. Please enter your grades: AAAAB Your GPA is 3.8
must be writting in java programming. the software that im using is dr. java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
