Chapter 26 Flashcards
1
Q
What are 3 types of inheritance
A
- Public
- Private
- Protected
2
Q
Does members of base class which are public remain public in derived class Does protected members of base class remain protected in derived class Does private members of base class be hidden in derived class
A
Yes
3
Q
What is default inheritance
A
Private
4
Q
Why we use private inheritance
A
We use private inheritance when we want to reuse code of some class.
5
Q
Is set a kind of collection
A
No
6
Q
What is difference between collection and set
A
Collection can have repetition of Elements but in set there is always unique elements.