OOP Flashcards

1
Q

what is a class

A

A template defining methods and attributes used to make objects

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

whats inheritnance

A

when a child class inherits propeties and attributes off a parent class

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

whats polymorphism

A

attributes and methods can take on many
different forms if required

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

how would poly be used in video game

A

allow for the attributes/methods of Player/Enemy objects to behave differently from normal if required.

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

benefit of encapsulation

A

makes it more secure , private variables

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