Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Distinguish between primary and foreign keys.

Answered: 1 week ago