I have to write a program that meets the following criteria:
[p]
Build a class called "grades_record" for storing the grades of each student in this course. This class will have the following integer (int) attributes (suggested variable names in parentheses):
an ID number for the student
grade for Programming Assignment 1 (prog1)
grade for Programming Assignment 2 (prog2)
grade for Programming Assignment 3 (prog3)
grade for Programming Assignment 4 (prog4)
grade for Programming Assignment 5 (prog5)
grade for Programming Assignment 6 (prog6)
grade for the midterm exam (MT)
grade for the final exam (final)
grade for the extrac credit assignment (EC)
Create the following methods:
constructors for a default grade record with ID and all grades set to 0 and for a grade record where all initial values are specified
accessors that return the ID and each grade
mutators that set/edit the ID and each grade
a function that calculates the final, overall score based on the formula:
final_score = prog1 + prog2 + prog3 + prog4 + 10*prog5/15 + prog6 + 20*MT/100 + 20*final/100 + EC
Once the class is set up, create a main function that calculates and outputs the final, overall score for the following students, along with their IDs:
I have the class file written, my issue is, how do I code the Main file? I'm not really certain on how one goes about calling the function and setting values etc. Help would be appreciated!
Below is what I have for my class .h and .cpp file-
.h file:
[p]
class grades_record
{
private:
int IDJack,IDJill,IDMax, assignment1, assignment2, assignment3, assignment4,assignment5, assignment6,MT,FINAL,EC;