OOP Flashcards
Define object
- stores state in field
- behaviour through methods
Define attribute
defines or describes the object
Define class definition
blueprint that defines the properties of all objects of the same type
Define instantiation
process of making an object from the class definition
What does UML (Unified Modelling Language) look like
contains:
- name
- attribute (data type)
- methods
Define method
operations that the class can execute
Define constructor
carries out actions that are needed when an instance of the object is created. e.g. initial values
Define Encapsulation
protects data by bundling the data and methods together within a class
What should attributes be declared as
- Private
- hidden within the class
What should methods be declared as
- Public
- access or modify attributes (getters and setters)
Describe inheritance
creating a new child class that inherits the attributes and methods of the parent class
What does an inheritance diagram look like?
open arrows pointing up to parent
Define Polymorphism
ability of the system to process objects differently depending on their data type or class
Define association
relationship between two entirely separate classes
Define aggregation
- one-way relationship
- “has a”
- open diamond