Question: You are given the following class definition: class Ratio { private: int num, den; public: Ratio ( int n , int d ) ; explicit
You are given the following class definition:
class Ratio
private:
int num, den;
public:
Ratioint n int d;
explicit Ratioint n;
Ratioconst Ratio& r;
void operatorRatio& a;
friend ostream& operatorostream& ostr, Ratio a;
Examine the following code. State after each line of the code whether a member
function of the class has been called or not. If yes, state which function was called.
Note that the output of the code is not required, as the function definitions are not
given:
Ratio a;
Ratio c;
cout a endl;
Ratio dc;
int n ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
