CS 123 Homework #5

Part I Due: Wednesday, Dec 3
Part II Due: Wednesday, Dec 10

Note: My version of the class implementations is available.

Aren't you lucky? Once again you have a chance to help your favorite professor.

Despite being the high profile computer science professional that I am, I still use a paper and pencil to keep track of grades. For this very course, in fact, a simple coffee spill could result in a drastic error that might affect someone's future. This is the kind of pain that I have to live with every day, and it's eating me up from within. At least I still look good.

Your final project for CMPU 123 will be to solve this problem for me. You must design, and implement, a system for handling student grades. You think this is so easy? If it was I'd have written it already for myself.

High-Level Design

You should define, at least, the following abstract data types. The descriptions below are minimal - if you want to add member functions or slots you may.

Basic Operation

Your program should work roughly as follows:
  1. The name of the program should be grader-lite.

  2. The program should be invoked with a single command-line argument, the name of a file containing grade information for a course, for example:
    % grader-lite cs123.fall97
    

  3. The program should read from this file all the current information about the course. At a minimum, the file may contain only a list of names and social security numbers - indicating no grades have been entered yet. Once grades are entered, the file will have grade information for each student, as well as the information associated with each gradedThing (see the definition of gradedThing above).

    The format of this file is up to you.

  4. The program should then present a simple user interface (desribed below) that allows a user to do various things with the grades. The user interface can just be a list of commands followed by a prompt to enter one of the command numbers. For example:
    Grader Lite Command Interface
    
    1) Add a new exam, homework, etc.
    2) Add/Change a students grade.
    3) Print a single students record with computed final grade.
    4) Print full class records with computed final grades.
    5) Print a single exam or homework with computed high/low/avg grades.
    6) Save current data to file.
    7) Exit Grader Lite.
    
    Please select a Grader Lite Command (1-7): 
    

  5. The program should take an input, perform the requested operation, and then present the command interface menu again. This process should repeat until the exit option is selected.

    User Interface

    What the user interface displays is shown above. Your interface is not required to look exactly like that, nor work precisely that way. It can be simpler or much nicer. It should, however, provide at least the functionality shown. Each of these choices is enumerated below with a description of what that command should perform.
    1. Add new gradedThing. This item is selected when a new project is assigned or test is given. It should create an instance of a gradedThing, prompt for the values of the slots (as described above), and then, for each student in the class, should prompt for the score they received. Entering a blank line for the score means the student did not get a grade.
    2. Add/change a grade. Should prompt for the SS# of a student, and the short name of a gradedThing. It should then display the current grade (if any) the student has for that assignment/exam, and prompt for a new one.
    3. Print a single student. Should prompt for the SS# of a student, and should display all the information about that student, including all the grades, and the final grade should be computed and displayed (the final grade is computed by multiplying the score of each grade times the weight of that grade, and adding these values together. No score for a grade counts as a 0 in this computation, though it should appear as a blank space in the output).
    4. Print full class. Should print out a line with all the short names of the graded things on the top as column labels, and then for each student print out their name and all their grades on one line. It should compute the final grade for each student and display it at the end of the line for that student. The students should be output in alphabetical order.
    5. print a gradedThing. Should prompt for the short name of a gradedThing, and for each student in the class, should display the grade they got. After the list of students is displayed, it should display the highest grade, lowest grade, and the average.
    6. Save. Should save everything to a file.
    7. Exit. Should save everything to a file and then quit.

      Part I

      You must submit a top-level design of your project. This should include complete interface (.h) and implementation (.C) files for each of your classes, a main routine that shows the top-level design through function calls, though the functions need not be implemented.

      No requirement will be made that what you submit work or even compile, but it should reflect a system that has been carefully designed. One aspect, though minor, of your grade will be the amount that changes in the final project.

      Part I is worth 30% of the total homework grade.

      Part II

      Submit a well documented working version of your program. I will actually use the best program that is submitted to keep track of grades...

      Part II Documentation will be worth 20%, implementation will be worth 50%.