Create a class list system for a school. The program must implement a single class, which is described in the following:
In the example below, words in italics represents user actions, while bolded words represent program output. In this example, the average grade of the given student is set to the default of 0%.
Example Usage and output:
-------------------------------------------------------------
Program displays menu.
User selects option (1)
Enter Student Program and Year:
CompSci 4
Enter Average grade, or leave blank:
User presses enter (meaning assumed 0)
Program displays menu.
-------------------------------------------------------------
Note that for option (2), output should resemble the following:
Program: CompSci
Year: 4
Average Grade: 0.0
Extend the class list system you created in Lab Exercise 2 with a subclass and also allow file I/ O for user interactions. The original program and its functionality should remain, but several new menu options are to be added:
Note (1): In the class list system, all students and graduate students should be stored in a single ArrayList, and Option (3) essentially loops through the list by calling the toString method for each object (either a student or a graduate student).
Note (2): A filename needs to be provided for Options (6) and (7). Loading an input file will create the related student objects and add them to the existing ArrayList, while saving an output file will dump the exisiting ArrayList to the related file. If an input file is empty, a warning message should be given to the user and writing output to an existing file will wipe out its current content.
Note (3): For graduate students, year is how many years they have been working on their graduate degrees.
In the example below, words in italics represents user actions, while bolded words represent program output. In this example, the average grade of the given student is set to the default of 0%.
Example Usage and output:
Program displays menu.
User selects option (6).
Please enter the name of the input file:
students.txt
***Reads and parses file***
Program displays menu.
-------------------------------------------------------------
The input file should be a text file with the following format:
Program Year avgGrade supervisor isPhD undergraduateSchool
where program, supervisor, and undergraduateSchool are all made of single words and isPhD is either 1 or 0
Examples:
CompSci 4 85.4 Song 1 Guelph
Psych 2 92.1
Biology 1 75.0 Cornell 0 McGill
You can assume that the input file is perfectly formatted since it is likely saved previously by your program. However, you cannot assume that the input file will exist, which must be error checked.
Extend the student class system you created in Lab Exercise Three with a HashMap and ensure that the program is robust by implementing proper exception handling. Finally, create a Graphical User Interface (GUI) for the Student Class Management System that has been developed so far in the labs.
Example Usage and output:
Program displays menu.
User selects option (6).
Please enter the name of the input file:
students.txt
***Reads and parses file***
Program displays menu.
-------------------------------------------------------------
The input file should be a text file with the following format:
Program Year avgGrade supervisor isPhD undergraduateSchool lastName
where program, supervisor, undergraduateSchool, and lastName are all made of single words and isPhD is either 1 or 0
Examples:
CompSci 4 85.4 Song 1 Guelph Smith
Psych 2 92.1 Brown
Biology 1 75.0 Wineberg 0 McGill MacDonald
You can assume that the input file is perfectly formatted since it is likely saved previously by your program. However, you cannot assume that the input file will exist, which must be error checked.
Information for the GUI part of the assignment:
Enter info about a new Student
Enter info about a new GraduateStudent
Print out all student info.
Print average of student averages, as well as total number of students.
Read input file.
File Data output.
Lookup via a HashMap key.
End program.
While no interface is specified, two are suggested in the following. Two rows of buttons across the top quarter of the interface might represent the options above. The next quarter of the interface might be a text input area used for searches and inputting file names. Finally, the bottom half of the interface would be reserved for a large, scrollable text area where all output is presented.
Alternatively, the interface can be divided into a small left panel and a large right panel. At the bottom part of the left panel, we can place all the buttons for the options and the top part for the input information such as searches and input file names. The large right panel is reserved for the scrollable text area that displays all output information.
Note that these interface ideas are only suggestions and you are allowed to create your own designs as long as all the functionality is supported. For example, you could also organize all the options into multiple menus in a menu bar so that you can free up more space for inputting data and displaying output information.
The rubric for this lab assignment is intentionally vague. It is up to you to design a clean interface for the user to work with. Usability is part of the marking scheme, and as long your UI is intuitive you can achieve a maximum of 100% for this lab exercise.