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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started