Question: In C++ language with comments In this task, you'll be writing a program that calculates the average percentage of students given their percentages for their

In C++ language with comments
In this task, you'll be writing a program that calculates the average percentage of students given their percentages for their individual courses, and identifies which student has the higher average percentage (assume the percentages won't ever be equal). The students will be modelled as instances of the class named marksBreakdown. The class has the following member variables and functions: Member Variables (all private): o An integer variable named "cs200" o An integer variable named "cs210" o An integer variable named "cs225" o A double variable named "average" Member Functions (all public): o Default Constructor: Set the value for all member variables to zero o Parameterized Constructor: Used to set the values for cs200, cs210, cs225 only o Setters: Used to set the values of every member variable setCS200, setCS210, setCS225, setAverage o o Getters: Used to get the value of every member variable getCS200, getCS210, getCS225, getAverage printResult: This function prints out the marks for CS200, CS210, CS225 and the average percentage of a student (according to the sample output) Note: You can ONLY access the values of cs200, es210, and cs225 directly when you're taking their input from the user in main(), after which you'll have to assign them to their respective member variables using the setter functions. Once they're assigned, you MUST use the getter functions to access their values throughout your code. In main(), take the user's input for the marks of 2 students (make sure they're between o and 100), and create 2 instances of marksBreakdown to represent the 2 students. Initialize one student using the setter functions, and the other student using the parameterized constructor. Next, use the setAverage setter to calculate the average percentage (assume every course has equal credit hours) of each student (you're not allowed to pass the marks from main()). Once the average percentage for both students have been computed and assigned to the average member variable, compare both students' average percentage in main(), and print it out with the marks of the student with the larger average percentage using printResult. The sample output's mentioned on the next page.
Step by Step Solution
3.43 Rating (156 Votes )
There are 3 Steps involved in it
Here is the implementation of the program in C with comments include include needed for setprecision using namespace std class definition class marksB... View full answer
Get step-by-step solutions from verified subject matter experts
