QUESTION 60 Assume the following class Complex public Complex(int, int), Winitializes the private data members to the passed in values: #real = value of the first argument 1 imag = value of the second argument Complex add(Complex); returns a Complex object that holds the sum of two Complex objects void printo: Oprints the values of the private data members in the format: (real, imag) private: int real, imag: }; Which of the following is a valid implementation of the print method? O a.void Complex printo { Complex c; cout << "C' <= c.real <<"," << c.imag <<")"<<endl; } Ob.void printo { Complexo cout << "C" << c.real ", " << c.imag << ")"<<endl; } Oc void Complex print ! cout << "(" << real <<"," << imag <<) << endl; "
An instance of a class is known as alan O a method . O b. object O c. thing O d.variable QUESTION 58 Overloading a method in object oriented programming means that O a.it has extra parameters that don't always have to be used Ob there are different versions that do the same thing with different arguments O c programmers can't write overloaded methods, only the system can do that O d. it gets worked too hard QUESTION 59 Constructors cannot take arguments, True O False
QUESTION 60 Assume the following class Complex public Complex(int, int), Winitializes the private data members to the pa
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
QUESTION 60 Assume the following class Complex public Complex(int, int), Winitializes the private data members to the pa
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!