1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
inheritance
polymorphism
encapsulation
abstraction
four pillars of OOP
inheritance
allows a new class (child) to inherit the properties of an existing class (parent), promoting code reuse
polymorphism
ability of an object to take on many forms, eg. shape can be circle or square
enscapsulation
hiding internal data by using access modifiers like private and public to protect integrity
abstraction
hiding complex implementation details and showing only the necessary features to users
superclass
the existing class being inherited from
subclass
the new class that inherits the features
inheritance
allows a subclass to acquire the methods and fields of a superclass
polymorphism
means “many forms” it occurs when different classes are related by inheritance but perform the same action in different ways
encapsulation (data protection)
is the bundling of data (fields) and the methods that operate on that data into a single unit or class, used for data hiding to keep vars safe from outside inheritance
true data hiding
achieved by making fields private and providing public getter and setter methods to control access
method
a block of code that performs a specific task and only runs when it is called
standard library methods ( - built in methods like touppercase)
user-defined methods (- created by the programmer)
types of methods
method definition
method call
parameter passing
execution
return value
method flow visualization