Fall 2002: CS333 - Problem Solving and Object Oriented Programming in
C++
[ Home |
Schedule
| Personal
Progress | Search |
Glossary |
Help
]
Objectives:
To build objects using other objects (Principle: Object Composition)
Functional Requirements:
In this assignment you are to implement a "PointInTime" class with features given below. A "PointInTime" is represented by a date and time (e.g. 3:30PM on 21SEP2002).
Features of the "PointInTime" class:
Default constructor which sets the initial value of a "PointInTime" to an appropriate state.
Non default constructor which takes two
parameters (a "Date" and a "Time" object)
(you may use any suitable definitions of a "Date" and
"Time" object from previous assignments and the book)
A set function that sets the Date (one parameter)
A set function that sets the Time (one parameter)
A get function that returns the "Date" part of a "PointInTime"
A get function that returns the "Time" part of a "PointInTime"
Write a main test drivers function "TestPointInTime.cpp" which will test the PointInTime class thoroughly - it will take as input a "Time" and a "Date" in the format "hour minute second day month year" and will print out the PointInTime as a Date (using the print format of assignment 1 and 2) and the Time (using the printstandard function from the book). For example to input the PointInTime for one minute after noon July 4, 2002 (uses my solution to illustrate input and output - input in red - I have left out some of the output which is used in other testing)
Enter time (hour minute second) and date (day month year): 12 1 0 4 7 2002 12:01:00 PM on 4JUL2002
Non-functional Requirements:
Put all files in a "assn3a.zip" file for submission
Submission: