OOP Lab 4
OOP Lab 4
Lab No. 4
Instructions:
Make separate cpp files and header files for each class.
Task 1: (10)
The Time can be stored only in seconds. And we can calculate hours, minutes and seconds from
total seconds in a day. In this Time class you have a total number of seconds in a day that has
passed. And user does not know that you have only seconds information. You have to code in
such a way that user assumes that it is a normal Time class that takes complete time
information as hours, minutes and seconds that converts that hours, minutes and seconds into
total number of seconds. In short you will reduce the unit of storage.
resize: deallocates the current allocated memory and allocates the new capacity and copy the
previous values.