Class
Template defining the attributes and methods that can be used to create a type of data known as an object.
What does Encapsulation do?
It protects attributes from being directly accessed.
How is encapsulation implemented?
By only allowing class methods to access data in an object’s attributes.
Inheritance
The concept of subclasses inheriting the methods and attributes of its parent class.
Method
A program subroutine that represents an action an object can perform.
Object
An instance of a class, with a set of methods and attributes.
Polymorphism
A property of OOP that means objects can behave differently depending on their class. This can result in the same method producing different outputs depending on the object involved.
What is good about object oriented programming?
What is bad about OOP?
Setter
A method that sets the value of a particular attribute.
Getter
A method which retrieves the value of a given attribute.
Why use getters and setters?
To ensure attributes cannot be directly edited and accessed.
How is encapsulation implemented?
By only allowing class methods to access data in an object’s attributes.
Constructor
Creates an instance of a class.
Instantiation
The process of creating an object.