AC++assignment
void Assignment::set(int, int, int)
___________________________________________________
Examples from the pdfs:
numQuestions = q;numMissed = m;numToPass = p;pointsEach = 100.0 / numQuestions;numericScore = 100.0 - (numMissed * pointsEach);
if ((numQuestions - numMissed) >= numToPass) return 'P';
}
{ numQuestions = 0; numMissed = 0; numToPass = 0; }
};
{ score = 0.0; } GradedActivity(double s)
{ score = s; }void setScore(double s)
{ score = s; } double getScore()
quiz.set(10,2,8);cout < "the="" score="" on="" quiz="" is:="">cout < quiz.getscore()=""><>cout < "the="" letter="" grade="" is:="">cout < quiz.getlettergrade()=""><>
____________________________________________________________________________________________________________________________________________________________________________________________________________
Polymorphism Chapter:
{private:
int main()
HW1.setScore(80); quiz.set(10,2,8);
gaPtr = &HW1;
cout < "hw1="" grade:="" "="">< gaptr-="">getLetterGrade() <>
cout < "quiz="" grade:="" "="">< gaptr-="">getLetterGrade() < endl;="">
HW1.setScore(80);
quiz.set(10,2,8);
cout < "quiz="" grade:="" "="">< gaptr-="">getLetterGrade() <>
{ return score; }virtual char getLetterGrade() const;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here