2150 inheritance Flashcards

1
Q

Specialization

A

“is-a” relationship, specialized form and may overried parent
ex - honda is a car

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

Specification

A
  • parent is abstract/superclass, subclasses implement the behaviour
  • like specialization but subclasses fill holes left incomplement by parent
    ex - interface in java
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Construction

A
  • child inherits most/all functionality, changes behaviour to something different (sub. principle does not hold)
    ex - implement a set class with class lIST
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Generalization

A
  • modifies behaviour of superclass to be more general (opposite of specialization)
    ex - vehicle is a superclass of car (bad idea)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

extension

A
  • add new abilities (no overriding)
    ex - stringset inherits from set, but adds string functionality as well
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

limitation

A
  • subclass behaviour is smaller/more restrictive than parent
    stack is a subclass of generic list, but doesnt use generic list’s functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

containment

A

“has-a” relationship, use one class as a data member

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

variance

A

multiple classes have similar implementations, but no hierarchal relationship

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

combination

A

> =2 parent classes, uses multiple inheritance

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