Question: class Clock { private: int minutes _ ; / / number of minutes from midnight public: Clock ( ) ; / / default constructor void

class Clock {
private:
int minutes_; //number of minutes from midnight
public:
Clock(); //default constructor
void plusHour(); //increase the time by 1 hour
void plusMinute(); //increase the time by 1 minute
};
Given that myClock is an object of the above Clock class whose current time is midnight, i.e.12:00 AM. Which of the following is a proper way to change the time to 1:00 AN
myClock.plusMinute();
myClock.plusMinute(60);
myClock.plusHour(1);
myClock.plusHour()
 class Clock { private: int minutes_; //number of minutes from midnight

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!