cs219_lab04_1.pdf

CS219- Lab04 Wiemann

Requirements:

1) Create a Java Program that uses an ArrayList to hold a collection of five lab scores, three exam scores, the final exam grade, and the first and last name. Then it outputs a detailed report (see below).

2) Make your classes conform to the following UML class diagram:

3) Input of the first name, last name, the five lab scores, the three test scores, and the final exam score will be obtained from the StudentDriver class

4) Calculation of the class average and the final grade will be computed in the Student class.

5) The end user should be prompted with a menu (see Sample run) and will need to be prompted for this menu until the user chooses ‘4’ to exit the application.

StudentDriver

main(args : String[]) : void

Student(firstName,

lastName, labScores[],

testScores[],

finalExamScore)

getClassAverage : double

getFinalGrade() : char

firstName : String

lastName : String

labScores[5]: int

testScores[3]: int

finalExamScore: int

classAverage: double

finalGrade: char

CS219- Lab04 Wiemann

6) The end user should be able to type in as many students input as he/she wants to (i.e. the ArrayList should be able to handle a dynamic amount of students)

7) A valid score for the Class Driver must be an integer value and that integer must fall between 0 – 100 inclusive. Any time the end user types invalid input for a lab score, test score, or final exam score the end user must be displayed with an error message.

8) The percent will be calculated (in the Student class) by taking the total points earned divided by the total points possible (will be 900 in this case). The output of the percent will be displayed as a percentage.

9) A letter grade will be determine from using the standard grading scale used in the CS219 course.

10) Option 2 will be displayed in the menu, however, a message should be displayed (if selected) that “Functionality will be added later”.

11) All shop standards are to be followed as instructed in class. 12) Name your project mrwJavaProject04 13) You will need to zip the contents of the entire project into a single zip file

and upload the content of that zip file to the dropbox on or before the due date.

CS219 Grade Menu

----------------

1) Input a student's grades

2) Find a student's grades by last Name

3) Display class grades

4) Exit

Input menu choice: 1

Input the first name of the student: Elmer

Input the last name of the student: Fudd

Input Lab Score #1: 100

Input Lab Score #2: 100

Input Lab Score #3: 100

Input Lab Score #4: 100

Input Lab Score #5: j

Lab Score 5 is not a valid input - please try again

Input Lab Score #5: 100

Input Test Score #1: 100

Input Test Score #2: 110

Test Score 2 is not a valid input - please try again

Input Test Score #2: 100

Input Test Score #3: 100

Input the Final Exam score: 100

CS219 Grade Menu

----------------

1) Input a student's grades

2) Find a student's grades by last Name

3) Display class grades

CS219- Lab04 Wiemann 4) Exit

Input menu choice: 1

Input the first name of the student: Bugs

Input the last name of the student: Bunny

Input Lab Score #1: 60

Input Lab Score #2: 60

Input Lab Score #3: 60

Input Lab Score #4: 60

Input Lab Score #5: 60

Input Test Score #1: 60

Input Test Score #2: 60

Input Test Score #3: 60

Input the Final Exam score: ABC

Final exam grade is not a valid input - please try again

Input the Final Exam score: 60

CS219 Grade Menu

----------------

1) Input a student's grades

2) Find a student's grades by last Name

3) Display class grades

4) Exit

Input menu choice: 3

CS219 Class Report

------------------

Student Name Lab1 Lab2 Lab3 Lab4 Lab5 Exam1 Exam2 Exam3 Final Percent Grade

------------ ---- ---- ---- ---- ---- ----- ----- ----- ----- ------- -----

Fudd, Elmer 100 100 100 100 100 100 100 100 100 100.00% A

Bunny, Bugs 60 60 60 60 60 60 60 60 60 60.00% D

CS219 Grade Menu

----------------

1) Input a student's grades

2) Find a student's grades by last Name

3) Display class grades

4) Exit

Input menu choice: 4