/* stats.h Written by Roger Priebe, Vangelis Metsis and (your name here) 08/31/15 This class will provide some simple statistics functions. //USE THIS FILE FOR DOCUMENTATION (INCLUDING PRE and POST CONDITIONS) */ #ifndef STATS_H #define STATS_H using namespace std; class Stats { static const int MAX_SIZE = 10000; private: int numVars; double vars[MAX_SIZE]; public: Stats(); void clearData() { numVars = 0; } //This function adds one variable to the array in the class. //pre: numVars < MAX_SIZE //post: numVars = numvars + 1 and var has been added to the class //param: var the variable to be added to the array. //return: boolean value indicating if the variable was successfully added to the class. bool addVar(double var); void showData(); double getAverage(); double findHighest(); double findLowest(); double calcStdDeviation(); int getNumVars() { return numVars; } static int getMaxSize() { return MAX_SIZE; } }; #endif