Lesson 1 of 11: 1. Learning Outcomes

At the end of this course, you will be able to

  1. Explain the OO concepts of classes, objects, methods and messages
  2. Implement a class with instance variables, instance methods and constructors
  3. Explain the concept of abstraction and encapsulation
  4. Construct a program using classes, objects, methods and messages

2. Introduction to Classes & Objects (10 Mins)

Lesson 2 of 11: 2.1 Introduction to Classes & Objects

Python is an object oriented programming language. Almost everything in Python is an object, with its properties and method. But what is object and what is classes?

Let's learn about it!

https://youtu.be/8yjkWGRlUmY

As we see from the video, a class is a description of what things should look like (properties), and the functionalities that can be called to manipulate those variables (functions).

Each object is an instance of the class, with the same set of properties, but different values. Just like the robots in the video, r1 and r1 have the same set of properties, name, color, weight but different values (r1 is Tom, a red robot that weight 30, while r2 is Jerry, a blue robot weight 40).

Now did you realize that we are objects of a class Human, with properties such as Name, Gender, Birthdate, Weight, Height, etc?

Let do some quick check to see if you understand what classes and objects were.


Lesson 3 of 11: 2.2 Knowledge Check

What is a class?

  1. It is a blueprint for an object