Question: clockType clock1; clockType clock2(23, 13, 75); clock1.printTime(); cout < < endl; clock2.printTime(); cout < < endl; clock1.setTime(6, 59, 39); clock1.printTime(); cout < < endl; clock1.incrementMinutes();

clockType clock1; clockType clock2(23, 13, 75);

clock1.printTime(); cout << endl; clock2.printTime(); cout << endl;

clock1.setTime(6, 59, 39); clock1.printTime(); cout << endl;

clock1.incrementMinutes(); clock1.printTime(); cout << endl;

clock1.setTime(0, 13, 0); if (clock1.equalTime(clock2)) cout << "clock1 time is the same as clock2 time." << endl; else cout << "The two times are different." << endl;

Explain why you would need both public and private members in a class.

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!