SatisfactionIndex is a class declared in
SatisfactionIndex.h. The sole purpose of this class is to maintain data about how the elevators are performing throughout gameplay.
The entirety of this class has been implemented for you.
sumIndexkeeps track of people’s satisfaction
sumUpRequestkeeps track of the total up requests satisfied
sumDownRequestkeeps tracks of the total down requests satisfied
sumExplodedkeeps track of exploded people
sumIdlekeeps tracks of all idle elevators throughout gameplay
Note that “good” performance means trying to maximize
sumDownRequest, while trying to minimize
One function in particular will be important to you:
SatisfactionIndex::printRawSatisfaction This function will print the raw satisfactions scores in the same order as the list above. This function has also been overloaded for you with the
<< operator. This provides useful functionality such as:
SatisfactionIndex benchmarks; cout << "Result:" << endl; cout << benchmarks << endl; // Output: Result: 0 0 0 0 0