I'm taking AP comp sci and I'm new to JAVA. Can someone help me write this program?
Write a program that accepts the letter grades for a student, calculates the student's GPA, and prints it out along with one of the following five messages:
Ineligible, taking less than 4 classes.
Ineligible, gpa below 2.0
Ineligible, gpa above 2.0 but has F grade (note: gpa >= 2.0)
Ineligible, gpa below 2.0 and has F grade
Your program must use an appropriate sequence of nested if-else statements to print out the appropriate message.
The message "Ineligible, taking less than 4 classes" has priority over the other 3 ineligible cases.
The program is not to ask the user for how many grades are in a student's report card. The program will continue to read grades until a non-grade character is input. At this point, some type of loop will cease and the program prints the GPA value and the eligibility message.
Example of run output:
GPA = 3.75 Eligible
You do not have to print out any of the individual grades.
Your program should allow input of grades in either upper or lower case.