Wyo Java Ch13Proj2

Write a class named APExam that includes the properties subject (String) & score (an integer between or including 1 and 5). This class should include all appropriate constructors, accessors, and modifiers.

Write a class named APStudent that includes the properties firstName and lastName as well as exams which is an ArrayList of all AP exams taken by the student (i.e. an ArrayList of APExam objects). This class must have a default constructor as well as a constructor that accepts the first and last names as parameters. It should also include accessor and modifier methods for both name properties as well as an accessor method for the list of AP exams. Also, the class must include a method that adds an APExam object to the list, a method that returns the student's average score on all exams, a method that returns the highest exam score that the student has earned, and a method that returns the number of scores that were a 5.

Write a driver program named Ch13Proj2 that uses Scanner to allow the user to enter a student's first and last names as well as AP exam subjects & scores (in that order). When the user is prompted to enter AP exam scores, he must be told to input the sentinel value 0 to indicate that he has no more exam scores to input. The program must then use the appropriate APStudent methods to compute and display the student's average exam score, the highest exam score, and the number of scores that were a 5.

Your program must follow our class Coding Standards.

Preconditions:

    • The user will input valid exam scores between or including 1 and 5.

You must hand in the following on separate pages stapled in this specified order:

    1. The source code for Ch13Proj2
    2. The source code for the APExam class.
    3. The source code for the APStudent class.
    4. The screen capture of your program's output with several different exams and scores.