OOP Flashcards
1
Q
what is a class
A
A template defining methods and attributes used to make objects
2
Q
whats inheritnance
A
when a child class inherits propeties and attributes off a parent class
3
Q
whats polymorphism
A
attributes and methods can take on many
different forms if required
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.
5
Q
benefit of encapsulation
A
makes it more secure , private variables