Question: Write a Clock class with the following attributes and member functions: int hour ( 2 4 hour format ) , minute. int numMsg, number of

Write a Clock class with the following attributes and member functions:
int hour (24 hour format), minute.
int numMsg, number of alarm messages.
string *msg, an array of alarm messages.
Accessor and mutator functions for each attribute. All get functions are constant
functions.
The set and get methods for msg need to have an argument as the index to the message
array.
A default constructor to set hour, minute to 0, and to set msg to null.
A constructor with 3 parameters to initialize hour, minute, and numMsg. The messages
are initialized as empty string.
A copy constructor.
Decide if the class needs destructor. If yes, then write the destructor.
Draw the class diagram for this Clock class. (4 points)
All functions are inline functions.

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 Programming Questions!