Question: Please do the following task in visual studio code as that's all I have access to right now. Program Purpose - Implement two classes Create
Please do the following task in visual studio code as that's all I have access to right now.
Program Purpose Implement two classes Create a TimeOfDay class that holds the hour, minute, and second of a time of day in private integer data members. The class will contain a constructor, a print function, and accessor and mutator functions for the private data members. Read the comments in the supplied timeofday.h header file for more detailed requirements. Initial tests for the functionality of the TimeOfDay class have been provided in the attached testtimeofday.cpp source file. If you place all of the attached files in the same directory, you can run the initial tests with command make checktimeofday. You are encouraged to create more rigorous tests. Create a TimeInterval class that has a start TimeOfDay object and an end TimeOfDay object as private data members. The class will include three constructors, a print function, and accessor and mutator functions for the private data members. Read the comments in the supplied timeinterval.h header file for more detailed requirements. Initial tests for the functionality of the TimeInterval class have been provided in the attached testtimeinteral.cpp source file. If you place all of the attached files in the same directory, you can run the initial tests with command make checktimeinterval. You are strongly encouraged to create more rigorous tests. Specifications Add all code for the definition of the TimeOfDay class to the attached timeofday.h header file. Include all of the necessary code for the TimeOfDay class, including the implementation of all of the public member functions, in the attached timeofday.cpp source file. Add all code for the definition of the TimeInterval class to the attached timeinterval.h header file.
Below is attached the makefile, please do not change it:
flags stdcWall I
timeofday.o : timeofday.cpp timeofday.h
g $flagsc $I
testtimeofday : testtimeofday.cpp timeofday.o
g $flags $o $@
checkit : checkit.cpp
g $flags $o $@
checktimeofday : testtimeofday checkit correcttesttimeofday.txt
testtimeofday studenttesttimeofday.txt
checkit
timeinterval.o : timeinterval.cpp timeinterval.h timeofday.h
g $flagsc $I
testtimeinterval : testtimeinterval.cpp timeinterval.o timeofday.o
g $flags $o $@
checktimeinterval : testtimeinterval checkit correcttesttimeinterval.txt
testtimeinterval studenttesttimeinterval.txt
checkit
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
