Question: c++ Question 18 You can declare access specifiers for sections of your class, including private, protected, and public. If you do not declare an access
c++
Question 18
You can declare access specifiers for sections of your class, including private, protected, and public. If you do not declare an access specification, what is the default for a class?
| private | |
| protected |
| public | |
| The application crashes because you must add an access specifier. |
Question 19
To overload the - operator, you would write a function named _____.
| overload - | |
| operator - |
| function - | |
| operator.overload(-) |
Question 20
What is the prototype to overload the operator so this line works? Rectangle bigBox = smallBox1 + smallBox2;
| Rectangle operator+( const Rectangle & secondOne ) const; | |
| Rectangle operator+( int ); |
| Rectangle operator++( const Rectangle & secondOne ) const; | |
| Rectangle operator++( int ); |
Question 21
_____ allows us to create new classes based on existing classes.
| Polymorphism | |
| Inheritance |
| Function overloading | |
| Composition |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
