Question: Consider the below class and answer the question that follows: class clockType public: void setTime (int hours, int minutes, int seconds); //Function to set the


Consider the below class and answer the question that follows: class clockType public: void setTime (int hours, int minutes, int seconds); //Function to set the member variables hr, min, and sec. void getTime (int& hours, inte minutes, int& seconds) const; //Function to return the time. clockType (int hours =0, int minutes = 0, int seconds = 0); //Constructor private: int hr; //variable to store the hours int min; //variable to store the minutes int sec; //variable to store the seconds }; Implement an overloaded less than or equal to relational operator such that the following code would compile: clock Type myClock(21,10,58); clockType yourClock(23,14,28); if (myClock
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
