Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started