Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q-01 * Which lines (numbers) form the class declaration (prototype) Q-02 * Which

ID: 3666683 • Letter: Q

Question

Q-01 *

Which lines (numbers) form the class declaration (prototype)

Q-02 *

Which line number creates a direct instance (named object) of the class

Q-03 *

Which line number creates an indirect instance of the class (unnamed object)

Q-04 *

Which lines define the code for the integer version of the member functions (outside the prototype)

Q-05 *

Which lies declare the floating version of the member function (inside the prototype)

Q-06 *

Which is the first line which contains the scope operator (belongs to)

Q-07 *

Which line number starts the declaration (as a prototype) with the use of call-by-reference?

Q-08

Which line number starts the definition of a function using call-by-value?

Q-09 *

Which line dereferences and calls a member function with an object pointer?

Q-10 *

Which line dereferences and calls a named object member function?

1·#include 2. using namespace std; 4. class myOps 6. public: int operate (int &a;, int &b;) float operate (float a, float b) 10. int myOps: :operate (int &a;, int &b;) 12 13. 14. float myOps: :operate (float a, float b) 15. 16 return (a*b) return (a/b); 18. int main ) 19. t 20.Yops myData: 21.myOPS 23 24. 25 26 27. myopst PmyData = new myops; int x=5, y=2; float n=5 . O , m-2 . 0 ; cout

Explanation / Answer

1. Line number 4 to 9 class declaration.

2. Line 20.

3. Line 21

4. Line 10 to 13

5.line 8.

6.line 10

7. Line 7

8.line 14

9.line25

10.line 24