Object Oriented programming Flashcards
1
Q
class
A
- template for an object
- defines that state and behaviour of an object
- state is given by attributes
- behaviour is defined by methods
2
Q
attribute
A
- gives an object properties
3
Q
method
A
- describes the actions an object can perform
4
Q
object
A
- a particular instance of a class
5
Q
encapsulation
A
- attributes are declared as private so can only be altered by public methods
- used for information hiding
- programs are made less complex by protecting data from being accidentally edited
6
Q
polymorphism
A
- when a subclass alters its inherited methods
- either by overloading or overriding