// Source File: ExamResultsDriver.C // // Test Program for ExamResults class // // Author: Alan Baumgarten // Date: March 12, 1999 #include #include "ExamResults.H" int main() { int s1 [10] = { 99, 87, 83, 73, 73, 70, 68, 66, 66, 37 }; int s2 [7] = { 33, 88, 94, 78, 85, 62, 99 }; ExamResults a (10, s1); ExamResults b (7, s2); cout << "a = "; a.Display(); cout << "b = "; b.Display(); cout << "a: mean = " << a.GetMean(); cout << " median = " << a.GetMedian(); cout << " max = " << a.GetMaxScore(); cout << " min = " << a.GetMinScore(); cout << endl; cout << "b: mean = " << b.GetMean(); cout << " median = " << b.GetMedian(); cout << " max = " << b.GetMaxScore(); cout << " min = " << b.GetMinScore(); cout << endl; ExamResults c = a; cout << "a copied to c" << endl; cout << "c = "; c.Display(); a = b; cout << "b assigned to a" << endl; cout << "a = "; a.Display(); cout << "Testing assertion in constructor:" << endl; ExamResults d (0, s1); return 0; }