/********************************************************************************************
ex5.cpp
Developing the military time class
********************************************************************************************/
#include <iostream>
#include "miltime.h"
using namespace std;
void paces(miltime& mt);
void main() {
//no arguments
miltime mtTest;
paces(mtTest);
//create using arguments
miltime mtTest2(3,15); //3:15 am
paces(mtTest2);
cout << "Add the first to the second: ";
cout.flush();
mtTest2.addSame(mtTest);
mtTest2.print();
cout << endl;
}
void paces(miltime& mt) {
//putting the object through it's paces...
cout << "Start: ";
cout.flush();
mt.print();
cout << endl;
cout << "Add 45s: ";
cout.flush();
mt.addSecond(45);
mt.print();
cout << endl;
cout << "Add 45s: ";
cout.flush();
mt.addSecond(45);
mt.print();
cout << endl;
cout << "Add 45m: ";
cout.flush();
mt.addMinute(45);
mt.print();
cout << endl;
cout << "Add 45m: ";
cout.flush();
mt.addMinute(45);
mt.print();
cout << endl;
cout << "Add 45h: ";
cout.flush();
mt.addHour(45);
mt.print();
cout << endl << endl;
}