Question: Define a class clockType to implement the time of the day in a program. Use three private int variables to represent hours, minutes and seconds.

Define a class clockType to implement the time of the day in a program. Use three private int variables to represent hours, minutes and seconds. setTime(int, int, int) sets the time, getTime(int&, int&, int&) retrieves the time, printTime() prints the time, incrementSeconds() increments the time by one second, incrementMinutes() increments the time by a minute and incrementHours() increments the time by one hour. Show how to use the class clockType in a program.

Refer to the C++ Programming Learning module on classes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!