When I first began coding, the subject of classes and object-oriented programming (OOP) in Python was a complete mystery to me.
The explanations and jargon employed made understanding more difficult, not more accessible, and the examples used involved barking dogs, speeding cars, and people’s age and hair color. It made it difficult to understand why and when I’d use a class.
In this course, I'll give you enough to understand the basics of classes, and we’ll use some real-world examples to illustrate the concepts discussed.
You'll look at some unique characteristics of classes that assist us in creating cleaner code.
You’ll continue with an example of a grocery store, create a
Stock class to explore the topic of inheritance, what that means and why you’d use it. I’ll also explain two other issues specific to classes, being encapsulation and polymorphism.
I’ll introduce the different types of inheritance you might encounter in your programming and illustrate them with code examples and I’ll even touch briefly on nested inheritance.
A typical online search queries the meaning of data abstraction in Python. When I began learning Python, the answers I found caused more confusion than they solved.
I will describe data abstraction in a clear way that will assist you in better understanding the concept.
Finally, we’re going to look at the Python Method Resolution Order or MRO for short. You'll understand that once the hierarchy of classes moves into multiple inheritances, you may return strange results or end up with incomprehensible errors. But, on the other hand, if you understand Python’s search order as it climbs the family tree, your coding life gets easier.
Overall, this course will teach you advanced object-oriented programming (OOP) concepts such as classes, inheritance, encapsulation, polymorphism, data abstraction, and method resolution order (MRO).
In other words, join the course and become an OOP master in five concise video lessons!