This lesson is still being designed and assembled (Pre-Alpha version)

Object Oriented Programming

Overview

Teaching: 0 min
Exercises: 0 min
Questions
  • What is Object Oriented Programming?

  • Why should I use Object Oriented Programming?

Objectives
  • Understand the concepts behind Object Oriented Programming.

Object Oriented Programming

Object Oriented Programming (OOP) is a style of programming that promotes the creation of objects to contain data and methods. Codes developed using OOP will contain a set of objects that interact with one another. Each object will consist of three main types of information:

  1. Constructor - A way to construct an element of the object. The process of constructing an object using its Constructor is called creating an instance of an object.
  2. Data - Each object may have data relevant to the object. These are often stored as variables within the object itself. Data is often assigned values through the constructor, meaning each instance of an object may have different values assigned to its data.
  3. Methods - Functions defined within a class are usually called methods. Similar to functions, they have a name, a set of zero or more parameters, and optionally a return value. Methods usually operate on the data within an object, sometimes utilizing information provided from outside the object.

Four main concepts of OOP covered in these lessons are:

This introduction will briefly cover each of these concepts and why they are useful to a software developer.

For further reading on Object Oriented Programming in Python, consider this tutorial or the Python3 documentation found here.

Key Points