Course web page: Introduction to Computer Science for majors II James Tam | Return to the course web page |
Due Friday October 9 at 4 PM
Implement a simple grade management program. Grades are stored as numeric grade points (4.0, 3.7, 3.3...0.0). The program includes basic statistical generation (average) and visualization of the data (show highest, lowest grade) as well as the ability to initialize grades (hard-coded or random). The program will employ a text-based menu-driven interface. There is not a requirement for including user input of the grades but the program should include the ability to either randomly assign grades or set the first ten elements to a fixed value (both of which will be useful when testing the other features).
The program consists of 3 classes:
Driver: starting execution point
UserInterface: responsible for displaying all menus, getting user input and determining the appropriate course of action. It is very similar to the similar to the ["GameInterface class"] in the "Dice example" covered in tutorial (Sept 27 - Oct 3).
Manager: stores the grades (1D array of double: maximum of 40 elements). While the user-interface class may be responsible for determining which option was selected by the user (e.g., display list, find highest grade etc.) it is only the manager class that can directly access or change the grade information.
Your marks will also be determined by your adherence to the stylistic conventions taught in class as well your program documentation. Also all output should not only be correct and the results clear but also reasonably neat and presentable. The real number portion of a grade should only be displayed to one place of precision (e.g. 3.0 and not 3.00)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You should create a UML diagram for class "Manager" and class "UserInteraface". All information for a class should be specified (e.g., attributes, methods, parameters, return values, permission levels). Also the relationship between the two classes including multiplicity (see the notes which introduce Object-Oriented concepts) should be specified. The class diagram can be drawn using any structured drawing program (even PowerPoint). However it must be correct and it must be understandable by the marker. The image that you submit via D2L must be in one of the following formats: 'gif', 'jpg', 'png' or 'pdf''.
You will need to use the built in code class Random. Beyond that (and common sense operators and functions such as those for input/output and mathematical operators), unless you told otherwise, you will need to write your own code and cannot use other pre-written Java classes or operators.
You can see sample output files in the A2 directory (/home/233/assignments/assignment2/output).