Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Basics of Object-Oriented Programming

Learning objectives

  • You understand the basic idea of object-oriented programming and how it differs from procedural programming.
  • You can view an object as a whole in which data and behavior are combined.
  • You understand the relationship between a class and an object, and how a class serves as a template for creating objects.
  • You can define your own class and its members, including attributes, methods, and constructors.
  • You understand the lifecycle of objects and can use objects as components of a program.
  • You know what the static modifier means in relation to class members.
  • You understand the principles and benefits of encapsulation and can distinguish an object's internal implementation from its external use.