CSci 1211 Problem set 7. Due Friday, March 19th at 5pm

Problem 1 (40 points)

Write a class StudentGrades which stores information about a student's grades in a class. Specifically, an object stores: The class must provide the following methods: Important: don't try to write all the methods at once, add them as you need them in the test class (see below).

Write the test class StudentGradesTest. Here is what you need to do:

A sample program output is like this:

Ann Smith       PS: 8 9 7 5 9           Midterm: 88     Final: 52
Brian Peterson  PS: 6 7 9 8 5           Midterm: 74     Final: 90
Carol Matthews  PS: 6 6 8 7 7           Midterm: 86     Final: 58
Darrel Green    PS: 5 10 6 8 5          Midterm: 69     Final: 55
Ellen Lee       PS: 5 9 6 5 9           Midterm: 56     Final: 71
Invalid grade value 12
Invalid problem set number 5
Invalid grade value 102
The average on the 3rd problem set is 7.2
Invalid problem set number 6
The grade of Ann Smith on problem set 6 is -1
Ann Smith has the highest problem set average 7.6
0 students have a perfect exam score
Ann Smith       68.8    D
Brian Peterson  78.8    C
Carol Matthews  67.6    D
Darrel Green    63.0    D
Ellen Lee       66.8    D
Everyone passed
Don't worry about minor problems with formatting. It's OK if your output looks like this:

Ann Smith       72.8    C
Brian Peterson  87.8    B
Carol Matthews  66.80000000000001       D
Darrel Green    75.2    C
Ellen Lee       64.0    D

This assignment is quite involved. Make sure to start early. If you have questions, please ask! The best way to do it is to e-mail the class list. You are also encouraged to answer each other's questions. However, please do not send your code to the class list.

Happy programming!

This page is a part of the course CSci 1211 at UMM.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.