Question: C++ code ... Test and make sure It runs... thank you Assignment 5 - Clock Direction: Submit the typed source code or git url. Building

C++ code ... Test and make sure It runs... thank you
 C++ code ... Test and make sure It runs... thank you
Assignment 5 - Clock Direction: Submit the typed source code or git
url. Building the Class For this assignment, you will create a clock

Assignment 5 - Clock Direction: Submit the typed source code or git url. Building the Class For this assignment, you will create a clock that expresses time in hours, minutes and seconds; however, the class will only stores seconds passed midnight. For example, 1: 30:00 PM translates to 48, 600 seconds passed midnight. The general formula for caleulating seconds passed midnight is S=hr x 3600 + mn x 60 + sd where hr is hour (0- 23), mn is minutes (0-59) and sd is seconds (0-59) The class Clock should be stored in the header file "Clock.h" and should consist of o Private int field named seconds o Public default constructor that assigns 0 (midnight) to seconds. a Public overloaded constructor that takes an int as a parameter named seconds. It assigns seconds to the seconds field only if it is between 0 and 86399 inclusively; otherwise, it assigns 0 to the seconds field. o Public copy constructor that performs a shallow copy. a Public overloaded assignment operator that performs a shallow copy. o public constant get method for the hour. It should return the hour represented by seconds in 24-hour format (0 23 . o Public constant get method for the minute. It should return the minute represented by seconds in 24-hour format (0-59) Public constant get method for the second. It should return the second represented by seconds in 24-hour format (0-59). o Public set method for hour. If the parameter is between 0 and 23 inclusively, it should adjust seconds to the new hour a Public set method for minute. If the parameter is between 0 and 59 inclusively, it should adjust seconds to the new ds to the new while maintaining the minute and second; otherwise, it does nothing minute while maintaining the hour and second; otherwise, it does nothing

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!