Starting from:

$30

CSCE 240 – Programming Assignment Four

CSCE 240 – Programming Assignment Four

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.cc source file. If you place all of
the attached files in the same directory, you can run the initial tests with the
command make checktimeofday. You are encouraged to create more rigorous tests.
Create an 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 fore more detailed requirements. Initial tests for the functionality fo the
TimeInterval class have been provided in the attached testtimeinteral.cc source
file. If you place all of the attached files in the same directory, you can run
the initial tests with the 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 all of the public member functions, in the attached
timeofday.cc source file.
- Add all code for the definition of the TimeInterval class to the attached
timeinterval.h header file.
- Include all of the necessary code for the TimeInterval class, including the
implementation all of the public member functions, in the attached
timeinterval.cc source file.
- You will submit a zip file (only a zip file will be accepted) containing
timeofday.h, timeofday.cc, timeinterval.h and timeinterval.cc to the
assignment in Blackboard.
- Source files must compile and run on a computer of the instructor’s choosing
in the Linux lab (see your course syllabus for additional details).
Grade Breakdown
Style timeofday.h: 0.25 point
Style timeofday.cc: 0.25 point
Style timeinterval.h: 0.25 point
Style timeinterval.cc: 0.25 point
Documentation: 1 point
Clean compilation of timeofday.cc: 0.25 point
Clean compilation of timeinterval.cc: 0.25 point
Clean compile/link with testtimeofday.cc: 0.25 point
Clean compile/link with testtimeinterval.cc: 0.25 point
TimeOfDay class passes instructor’s modified testtimeofday.cc tests: 4 points
TimeInterval class passes instructor’s modified testtimeinterval.cc tests: 3 points
The penalty for late program submissions is 10% per day, with no submission
accepted after 3 days.

More products