class StudentGrade
{
public:
double getFinalNumericGrade(int a, int b, int c)
{
qgrade = a;
mgrade = b;
fgrade = c;
int first = a + b + c;
double last = first/160;
return last;
}
int getFinalLetterGrade()
{
char one, two, three, four, five;
one = 'A';
two = 'B';
three = 'C';
four = 'D';
five = 'E';
if(getFinalNumericGrade<=59)
{
return five;
}
else if(getFinalNumericGrade<=69)
{
return four;
}
else if(getFinalNumericGrade<=79)
{
return three;
}
else if(getFinalNumericGrade<=89)
{
return two;
}
else if(getFinalNumericGrade<=100)
{
return one;
}
}
private:
int qgrade, mgrade,fgrade;
};
I know I'm not calling the NumericGrade function correctly in the FinalGrade function and I heard there's a way to show if/else statements better but we haven't gone over it yet.. I'm just stuck completely and don't know what to do now. If someone can shed some light here on what I need to change or fix that'd be great
This post has been edited by oAllElseFailo: 13 March 2012 - 03:30 PM

New Topic/Question
Reply



MultiQuote




|