1
0

usetime0.cpp 645 B

123456789101112131415161718192021222324252627282930313233
  1. // usetime0.cpp -- using the first draft of the Time class
  2. // compile usetime0.cpp and mytime0.cpp together
  3. #include <iostream>
  4. #include "mytime0.h"
  5. int main()
  6. {
  7. using std::cout;
  8. using std::endl;
  9. Time planning;
  10. Time coding(2, 40);
  11. Time fixing(5, 55);
  12. Time total;
  13. cout << "planning time = ";
  14. planning.Show();
  15. cout << endl;
  16. cout << "coding time = ";
  17. coding.Show();
  18. cout << endl;
  19. cout << "fixing time = ";
  20. fixing.Show();
  21. cout << endl;
  22. total = coding.Sum(fixing);
  23. cout << "coding.Sum(fixing) = ";
  24. total.Show();
  25. cout << endl;
  26. // std::cin.get();
  27. return 0;
  28. }