Home‎ > ‎Assignments‎ > ‎

Student Inheritance

Re-Write one of your "Grading" programs to include 

(a) a Student class that has (at least) 2 data members: name, a string object, and gpa, a float object.  Your class specification should also include the definition of the access and modifier functions (get and set functions) needed to reference these data members.

(b) a class UndergradStudent, derived from the Student class of part (a), that has data members credits, an integer, and major, a string object. Include access and modifier functions for these new objects.

(c) a class CIS4100Student, derived from the UndergradStudent class of part (b), with data members: exam, an array of floats; HW, a float object representing the proportion of homework assignments completed successfully, average, a float object; grade, a character object.  You will need access and modifier funcitons for the new objecrts and the following member funcitons:  a function to compute the average (you may code the weights for exams and homework as constants or input them as data (once only) somewhere in the program) and a function that uses the average to determine the students letter grade for the course based on the weighted average (in whatever manner you wish).