1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Class
Blueprints for creating objects where they each have attributes and behaviours
Objects
Instance of a class
Methods
Attributes
Inheritance
Inheriting attributes and methods from the parent class
Encapsulation
Prevents certain data from being changed/overridden in the program
Polymorphism
Making a method behave differently for a different subclass
Instantiation
Creating a new object from a class
Public
Access to all code (+)
Protected
Access to members of the same class and child class. (#)
Private
Access to only members of the same class. (-)
Aggregation
When an object is destroyed, the other objects inside won't be destroyed.
Composition
When an object is destroyed, the other objects inside will also be destroyed.
Example of Composition
If we have a school and inside that classrooms. If we destroy the school, the classrooms won't exist
Example of Aggregation
If we have a coach and a player, if the coach is destroyed the player will remain
Overriding
It overrides a method, changing how it behaves
Polymorphism - Method Overloading
Class contains methods of the same name that have different parameters