Question: 1. If a member function of a class already provides all or part of the functionality required by a constructor or another member function, then:
1. If a member function of a class already provides all or part of the functionality required by a constructor or another member function, then:
copy and paste that member function's code into this constructor or member function.
call that member function from this constructor or member function.
that member function is unnecessary.
this constructor or member function is unnecessary.
2. Which of the following is not true of a destructor?
| It performs termination housekeeping. |
| It is called before the system reclaims the object's memory. |
| If the programmer does not explicitly provide a destructor, the compiler creates an empty destructor. |
| 3. Classes cannot:
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
