Chapter 26 Flashcards

1
Q

What are 3 types of inheritance

A
  • Public
  • Private
  • Protected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is default inheritance

A

Private

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why we use private inheritance

A

We use private inheritance when we want to reuse code of some class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Is set a kind of collection

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is difference between collection and set

A

Collection can have repetition of Elements but in set there is always unique elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly