2.2: Fundamental Concepts of OO Programming
2.2.1: Classes vs. Objects
Read this section, which explains objects and classes in Python.
Please read this section. This section explains fundamentals of object oriented programming. As you read, focus on the following concepts:
- Classes vs. objects
- Inheritance
- Encapsulation
- Polymorphism
- Classes vs. objects
2.2.2: Encapsulation
Encapsulation is to put both data, and operations that can be performed on this data, in a single class. The advantages of encapsulation include information hiding, which means the user does not need to know the implementation details of the internal design, but is still be able to access and modify the data through public operations provided.
2.2.3: Inheritance
Inheritance is to reuse the existing classes when creating a new class. The derived class will inherit public operations defined in the base class. It usually involves a hierarchy of related entities.
2.2.4: Polymorphism
Read this article, which explains the concept of polymorphism, a critical concept for OO programming.
2.2.5: Decoupling
Please read this article.