Question: in c++ program ::::Question 1: Chapter 10 defines class clockType to implement time in a program. The class includes functions named setTime(int hours, int minutes,

in c++ program ::::Question 1: Chapter 10 defines class clockType to implement time in a program. The class includes functions named setTime(int hours, int minutes, int seconds) and getTime(int& hours, int& minutes, int& seconds) const in order to set and get clock time, respectively. Modify the class by adding six additional functions (setHours, setMinutes, setSeconds, getHours, getMinutes, and getSeconds) so that the users can set/get hours, minutes, or seconds separately. Also modify the main function to make sure your code provides the same output as follows:

Current clock (hr:min:sec) : 05:04:30

Update hours: 06

Current clock (hr:min) : 06 : 04

Update minutes: 35

Current clock (min :sec) : 35:30

Update seconds : 59

Current clock (hr:min:sec) : 06:35:59

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!