SE-1021 Software Development 2
Lab 1: ArrayLists revisited - GradeCalculator application

Objectives

Assignment

In this lab, you will write a program that corresponds to the following UML class diagram:

Your program will consist of several classes; you have to write only two of them - the FileReader.java class (in the msoe.se1021 package) is complete and you only need to use it in your application. Do NOT modify this file. The comments within the file explain the use and purpose of the methods.

You must write the GradeCalculatorApp class and the Student class (to be put in the msoe.se1021.<yourname> package). The descriptions of the purpose of the methods in the classes that you must write can be found in this javadoc.

Your program must be capable of reading the following file: students.txt, which contains a list of student names (first and last), their major, their id, and a list of 10 grades. After reading this file, your program should create a Student object for each student read from the file and add it to the ArrayList<Student> collection of GradeCalculatorApp. Each Student object in the collection in turn contains a ArrayList<Double> collection the 10 grades.

Once this internal structure is built, your program should produce the following output.

Enter a file to read: students.txt
Archy, Ann : 90.2
Miegh, Bill : 81.3
Reply, Curt : 84.9
Closed, Dora : 84.1
Ucation, Ed : 86.1
Furter, Frank : 82.5

Class average = 84.8

Your program must be capable of handling invalid filenames; for example, for a file that does not exist:

Enter a file to read: missing.txt
The FileReader encountered an error.
The file could not be opened; status = 47

If no file at all is specified, your program should produce something like this:

Enter a file to read: <Enter key pressed with no input>
Error in filename specification; exiting.

Lab Submission (due date in Blackboard)

Submit your assignment following these instructions:

Be sure to keep copies of all your java files, in case something gets lost.

Your grade will be based on the following criteria: