1: // Filename: TESTIME1.CPP
2: // Purpose: Driver for testing the Time class in the files
3: // TIME1.H and TIME1.CPP, with the Time class being made
4: // available by including TIME1.H and linking with TIME1.OBJ.
6: #include <iostream>
7: using namespace std;
9: #include "TIME1.H"
12: int main()
13: {
14: cout << endl
15: << "This program accesses a simple Time "
16: << "class via separate specification and " << endl
17: << "implementation files. You should study "
18: << "the source code at the same time " << endl
19: << "as the output. " << endl << endl;
21: Time t1;
22: Time t2;
24: t1.Set(11, 59, 50);
25: t2.Set(12, 0, 0);
27: t1.Display(); cout << endl;
28: t2.Display(); cout << endl << endl;
30: for (int i = 1; i <= 11; i++)
31: {
32: t1.Display(); cout << endl;
33: t1.Increment();
34: }
35: cout << endl;
37: return 0;
38: }