This lesson summarizes the topics we'll be covering in section 07 and why they'll be important to you as a data scientist.
You will be able to:
- Understand and explain what is covered in this section
- Understand and explain why the section will help you to become a data scientist
As with the last section, section 07 is really focused on getting you comfortable with Object Oriented Programming. It really does take a little while to get used to it, but when you do it'll make everything else you do as a programmer easier.
Firstly we run you through the init
method that you use to create new objects (like "Sam") from a class (e.g. Person).
We then start to show how you can use a combination of attributes and methods to represent real world objects with a combination of state (the properties) and behavior (methods).
We then introduce the idea that classes - not just instances - can also have state and behavior and show some of the use cases for class variables and methods.
In the inheretance lessons, we introduce one of the most powerful (and most frequently over-used) mechanisms for reuse in OOP - the fact that classes can inherit from each other. For example, a Customer can inherit from a Company, as can a Supplier, so you can have some shared attributes and methods for Companies - whether they're buying from you or selling to you.
Finally we pull together everything we've learned in the last couple of sections and apply it to data science by showing how to create an object oriented Herd Immunity Simulation!
In this section, we're introducing some additional concepts that you'll need to become comfortable with Object Oriented Programming, and we're bringing them together in a project that shows you one way to use OOP to solve a data science problem.