OOD – Quick Intro Summary


Concepts and terms to know well

A class is like:

  • a category or type
  • a blue print
  • a factory
  • a template

A class defines how “objects” or “instances” should be created and maintained.

The “data fields” or “instance fields” define the state of the object.

The “methods” or “behaviors” manipulate the “data fields” or “instance fields” to ensure consistent and proper handling.

If you notice, the instance fields are private. This fact and the use of methods to handle the instance fields promotes ENCAPSULATION.

Unprotected data

Encapsulation