GradeCalculator

The main objective in this assignment is to build a small prototype which would be useful in
simulating and testing a partial set of requirements of a fully-featured tool that an instructor
can use to maintain partial grades and compute final grades in a course. Secondly, to give you
practice designing and coding simple classes and methods using loops, conditionals and console
I/O in the Java language. Lastly, to give you an initial exposure to object-oriented techniques to
solve computational problems. To attain these goals, you will organize the programming of this
prototype around the following modular entities:
First, you will write a Java class named Student that allows the creation and maintenance of the
marks, as well as of the final mark, for each student in the course.
Second, you will write a Java class named GradeCalculator which will drive the operational
features of your tool and the text-based console I/O for receiving commands from and issuing
results to a user.
Description
I — User Interface and Program Flow
Upon starting, your tool will display on the console the following menu:
Grade Calculator (Version 0.1). Author: [Your first and last name]
1 – Simulate Course Marks
2 – View/Update Student Marks
3 – Run Mark Statistics
Select Option [1, 2 or 3] (9 to Quit):
Upon completing the processing of any of the operations 1, 2, or 3, your program will return to
display the previous menu and wait for the user to select a menu option. If the user enters 9,
the program terminates.
a) Simulate Course Marks – Selecting this option will run a simulation that creates all the
Student objects for a course of size N students, assigns to each student randomly-generated
marks for assignments 1 and 2, and the final exam. If Student objects from previous course
marks simulations exist when running this simulation, their status attribute will set to false
before creating the Student objects corresponding to the new simulation.
First, the program will prompt the user to enter the class size by displaying the message: Enter
course enrollment size:
Next, the program will issue in sequence the following prompts to the user, asking for weight
percentages within given ranges: Enter weight assignment 1 (20-30):, Enter weight assignment
2 (20-30):, Enter weight final exam (40-60):. If any of the weights is out of range, the program 

will repeat the prompt for the respective weight. If the entered weights do not add up to 100,
the program will display the message << Error: weights do not add up to 100% >>, and will
return to and display the selection menu.
b) View/Update Student Marks – Selecting this option will display the prompt Enter Student
Number:
If the user enters an invalid student number, or the number corresponds to an inactive Student
object (i.e., object’s status attribute is set to false), the program will display the message:
[entered student number] is invalid, and will return to and display the selection menu.
Otherwise, it will display the message: View or Update? (V/U):, and will wait for the user to
enter a selection. If the user enters V, the program will display all the course marks for the
selected student. If the user selects U, the program will display the prompt Mark Type? (A1, A2
or FE): and will wait for a selection from the user. Once the user has input one of the possible
options, the program will display the selected mark as: [Mark Type] is [mark], and will return
to and display the selection menu. If the user enters an invalid mark type, the program will
display the message: [Mark Type] is an invalid mark type, and will return to and display the
selection menu.

Leave a Reply

Your email address will not be published. Required fields are marked *