CIS-3012 Homework #2: Class Time

Due: 2023-09-22

Read Chapter 7 in the primary text (Lippman, et al.). In Chapter 14 of the primary text, read sections 14.1 through 14.3.

The file homework-02.zip contains the definition of class Time in Time.hpp, a skeletal implementation file with placeholders for the required functions and methods in Time.cpp, a test program named Time_test.cpp, and a Makefile.

  1. Implement class Time by filling in the placeholders in Time.cpp file so that the test program works.

    The header file Time.hpp is complete and should not need to be edited. In theory, as the implementor of the class, you should be able to modify the private section of the class definition in the header file since that is technically part of the implementation. However, in this case, that should not be necessary. The only file you should need to change is Time.cpp.

Submit your Time.cpp to Canvas. Be sure your submission can be compiled and tested using g++ on Lemuria; I will try it.


Last Revised: 2023-09-07
© Copyright 2023 by Peter Chapin <peter.chapin@vermontstate.edu>