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.:

  1. No F's.
  2. Minimum 2.0 average.
  3. Enrollment in a minimum of four academic classes.

Assignment:

  1. 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
    
  2. Your applet must use an appropriate sequence of nested if-else statements to print out the appropriate message.
  3. The message "Ineligible, taking less than 4 classes" has priority over the other 3 ineligible cases.
  4. 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
  5. Your program should allow input of grades in either upper or lower case, and ignore spaces, punctuation and all non-grade characters.
  6. 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!
    
  7. You will need a web page to display your applet. Your homepage should have a link to the web page for this assignment.
  8. Submit the URL of your applet along with your Java code (the .java file(s)) in an email message to mrsimon@lycos.com