Ok I have the header file and implementation file, and need to create one more class(CurvedActivity) to make the program work.
Assignment:
The setScore member function stores a value in score, then calls the determineGrade member function to determine the letter grade. Suppose a teacher wants to “ curve” a numeric score before the letter grade is determined. For example, Dr. Harrison determines that in order to curve the grades in her class she must multiply each student’s score by a certain percentage. This gives an adjusted score, which is used to determine the letter grade.
Write a class CurvedActivity that is derived from the graded activity class. It allows the user to enter the students raw score and curve percentage and print the raw score and curve percentage. In addition is should print the curved grade of the student where curved grade is calculated by multiplying the raw score with a percentage
So if the raw score is 80 and the curve percentage is 1.25, the curved grade is 100 (80*1.25)
// Implementation file for the GradedActivity class
#include "GradedActivity.h"
//******************************************************
// Member function GradedActivity::determineGrade *
//******************************************************
void GradedActivity::determineGrade()
{
if (score > 89)
letter = 'A';
elseif (score > 79)
letter = 'B';
elseif (score > 69)
letter = 'C';
elseif (score > 59)
letter = 'D';
else
letter = 'F';
}
pretty much everything lol.. Where does my main function go? How do I compile the program without a main function? I have already created my CurvedActivity.h and CurvedActivity.cpp files, just need to put the correct code in each of them. Shouldn't my main function be called in CurvedActivity.cpp?
Traditionally, the main function should be in a file named Main.cpp, or just in a cpp file of its own. You need to compile it along with all the other cpp files.
1. I think you have to do input and output in main, not in any of the functions in your class
2. The assignment mentions another class that your class must derive from
3. You're missing a few member functions that your assignment wants you to have