1. | What is inheritance? | |
2. | How do you call an overloaded constructor in the base class? | |
3. | What is another word for base class? | |
4. | How would you declare class a so that it inherits from class b? | |
5. | What is another term for derived class? | |
6. | What is a protected variable? | |
7. | What is another word for a function that is part of a class? | |
8. | Are private members inherited? | |
9. | When you have a derived class, which constructor is executed first…the derived class constructor or the base class constructor? | |
10. | When one class contains another class, what type of relationship is there? | |
Answers
1. | It is the process whereby one class gets, or inherits, all the public and protected members of another class. |
2. | The derived classes constructor is declared to call a specific base class constructor. |
3. | Parent class |
4. | class derived::public class b |
5. | Child class |
6. | A variable that is private, but can be inherited |
7. | method |
8. | No |
9. | The base class |
10. | This is a has-a relationship |