Skip to content

Object Oriented Definitions

Estimated time to read: 1 minute

Vocabulary Definition Example
Object An individual instance of a class An 'Employee'. Objects can be defined as 'anthropomorphic data'
Class A blueprint for creating objects A template for an 'Employee '
Instance An instance is an object which holds unique data, it is built from a class
Attribute Data held by an instance. A class defines what attributes an instance can have. It is the instance that actually has the attributes.
Methods A class defines what methods are available. Methods act upon individual instances. employeeInstanceOne.doWork()
Vocabulary Definition Example
Encapsulation Hiding implementation and data behind an interface / contract
Polymorphism The ability to define a common interface for mulitple XXX, despite having many different implementations
Inheritance A means by which to create specialised forms of an abstraction, such as an Employee being a specialised form of a person An 'employee' has all of the attributes associated with a 'person' as well as additional attributes specific to 'employee '

Corner Cases

Class Level Attributes

Screenshot 2022-07-20 at 17.01.04.png

  • A class, above, is defining that instances will have a name and an ID
  • The class itself is keeping track of the next ID to use
  • Two instances have been created from the class
  • Neither of the instances know the value data that is being held by the class