Variables contained within and associated with an object. Howard: a characteristic of an object.
4 of 11
Define Method:
A subroutine associated with an object. Howard: a callable attribute defined in the class - they change the state of attributes.
5 of 11
Why OOP?
You can access pre-written, efficient, well-tested libraries of code
6 of 11
3 Fundementals of OOP
Encapsulation, Inheritence, Polymorphism
7 of 11
Define Encapsulation
The controlling of access to values of attributes within an object, preventing unauthorised access to them. Ensures private attributes can only be changed by public methods. Getters and setters help with this
8 of 11
Define Inheritance
Ability for a class to inherit methods and attributes of a parent class. Can also have its own class / override methods of parent.
9 of 11
Define Polymorphism
Ability for objects of different classes to be treated in the same way.
10 of 11
Define Overriding
A method of a child class is modified to provide a localised version of a method already provided by its parent class.
11 of 11
Other cards in this set
Card 2
Front
An instance of a class.
Back
Define Object
Card 3
Front
An object constructed using the class
Back
Card 4
Front
Variables contained within and associated with an object. Howard: a characteristic of an object.
Back
Card 5
Front
A subroutine associated with an object. Howard: a callable attribute defined in the class - they change the state of attributes.
Comments
No comments have yet been made