The Grader class is keeping track of a set of exam scores. Scores can be added
one at a time thru calls to addScore( ... ) or it can add a set of scores thru
calls to addScores( ... ). Once scores have been collected, the Grader class can
find the best and worst scores it has seen so far thru calls to findBiggest( ) and
findSmallest( ). Both of these methods are read-only operations, so you won't be
able to change or update anything inside the Grader instance object. Processing
arrays lead to lots of loops and that is what will be necessary in these methods.
As for the MAX_SIZE constant, I would recommend you just set it to a very large
number (say 100...) and move on.
#include <iostream>
#include "Grader.h"
int main( )
{
Grader g;
double d[5]= {99,70,85,93,84};
double e[4]= {100,81,60,91};
g.addScore( 75 );
g.addScore( 82);
g.addScores( d, 5 );
cout << "Best Score = " << g.findBiggest( ) << endl;
/// should give value 99
cout << "Worst Score = " << g.findSmallest( ) << endl;
/// should give value 70
g.clear( );
g.addScore( 50 );
g.addScore( 74 );
g.addScores( e, 4 );
cout << "Best Score = " << g.findBiggest( ) << endl;
/// should give value 100
cout << "Worst Score = " << g.findSmallest( ) << endl;
/// should give value 50
}
I suppose what's causing me the most confusion is how to go about programming the addScores constructor and how to call back those array numbers into findBiggest and findSmallest