Question: Declare a Class named Clock. A clock has a value for hours, minutes and seconds as attributes. Include in your class, a method/member function named

Declare a Class named Clock.

A clock has a value for hours, minutes and seconds as attributes.

Include in your class, a method/member function named setClock that copies the three values passed into it as parameters.

Include a constructor in your class that initializes a new Clock object to be set to 12:00:00.

Include an operator method on class Clock that returns true if two clocks are equal values. If c1 and c2 are clocks, then the method would be invoked as: c1 == c2

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!