OOP (2.4) Flashcards
Attributes
Properties stored about objects
Methods
Things object can do
What happens during inheritance?
Subclass inherits all of its attributes and methods from superclass
Class
A blueprint for creating objects
How can methods or attributes of a public object be called?
Using dot notation
Setter
Special type of attribute that sets one of the attributes equal to specific value
Getter
Special type of attribute that obtains value of one of the attributes of object
Encapsulation
A way of making sure that each attribute can only be accessed/modified by methods that are set when defining class
Polymorphism
When a subclass alters its inherited methods by either overloading or overriding
Overloading
When a method defined in subclass has same name but different arguments to method defined in superclass
Overriding
When only a method’s implementation within subclass is changed