AP Java Assignment 3
Background:
Suppose a high school district decided on these academic standards for eligibility in extracurricular activities
such as athletics, music, drama, etc.:
- No F's.
- Minimum 2.0 average.
- Enrollment in a minimum of four academic classes.
Assignment:
- Write an applet 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:
Eligible
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 applet 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 applet class will contain and use the following methods:
boolean isGrade(char cLetter)
int gradeToNumber(char cLetter)
double gpa(String sGrades)
boolean hasFs (String sGrades)
boolean has4orMoreClasses(String sGrades)
as well as other methods
- Your program should allow input of grades in either upper or lower case, and ignore spaces, punctuation and all non-grade characters.
- Use these sample report cards as inputs for your run outputs:
bbcbf
c d c
A ,B ,A
c--B--d--D--D--C
AABAABA
Here we go: D! C! F! F! D!
- You will need a web page to display your applet. Your homepage should have a link to the web page for this assignment.
- Submit the URL of your applet along with your Java code (the .java file(s)) in an email message to mrsimon@lycos.com