Programming Assignment 6 (class assignment 7)
Acme Programming has assigned you to revise the prototype program (demonstration program) that will demonstrate a student grading project. The revised project will be to create a program that will average grades for students. However, you will not know the total number of students nor the number of grades per student until run time. The program will compute and display the average of the grades according to a formula and then assign a letter grade based on the grading scale. The grade averages will also be displayed on the screen, sorted from the highest to the lowest average. You are also required to display the overall class average.
The formula:
All grades will be equally weighted and averaged..
The scale:
90 - 100 A
80-89 B
70-79 C
60-69 D
0 - 59 F
Other Requirements
This is to be an object oriented program which implements a student class. You must use the multi-file approach (either two files or three). Most likely you will have to declare an array of the object. It will have to be declared dynamically during run time. You will also have to declare an array of a member of the class to contain the grades. This array will be declared dynamically. You can decide what variables and functions are private or public but your program must demonstrate both. The sorting function must be a part of the class. This program must demonstrate use of a static class variable (for the class average).
You must also assume the user will enter incorrect data. You must program data checks to ensure that any grade entered is numeric and between 0 and 100.
Failure to follow these rules will result in a substantial deduction, depending on the severity of departure of guidelines.
Style
You are required to follow the programming style outlined in the book. Style is very important in the programming world since it helps readability and will aid other programmers in understanding your code. We will follow certain style rules in our class but keep in mind that there are variations found throughout the programming world. The key is to develop a style and then follow it. We will follow a style common to C++ which includes:
Program Name
Your Name
The date the program was completed
Comments describing the purpose of the program
Grading
This program plus flowchart is worth 50 points. The points will be distributed as follows:
| Style | up to 5 points |
| Program compiles | up to 5 points |
| Program produces accurate data | up to 10 points |
| Program checks data entry | up to 5 points |
| Use of object oriented programming | up to 10 points |
| Program sorts | up to 5 points |
| Dynamically created arrays | up to 10 points |
Flowchart
None required
Due Date
The program is due by midnight, Thursday, Dec 11. Your program should be mailed to my e-mail address, shalfhill@pjc.edu with your program(s) attached. The subject line of your e-mail should read Programming Assignment 6. No late programs after Monday, Dec 15, will be accepted. 20% deduction for late programs.
What do you turn in?
Please include your name, phone and e-mail address that I can contact you if I have problems with the program.
Extra Credit
Up to 5 points extra credit to display (in sorted order by average) the id, grade average, and letter grade.
Up to 3 points extra credit for allowing user to enter their own grading scale or to accept the standard grading scale.
An extra 5 points of credit if the program allows you to search for a specific student ID. The search function (linear or binary, your choice) must be a method within the array in order to receive the full 5 points. Partial credit given if the search routine is a function in the main program.
Up to 5 points extra credit for using exceptions as outlined in Chapter 15.
Up to 10 points extra credit to build a program that works with pointers. The program must have multiple uses of pointers for full 10 points. Partial credit given.
This programming assignment may be corrected or updated. Watch our class website for late breaking details.