Objects and Classes

In lesson, we will introduce some new programming concepts, beginning with the idea of Classes and Objects. In programming, we can think of Classes as a “Template” for making objects. A class tells us what an object can do, as well as what things it keeps track of. To help visualize what this means, imagine a class named “Basketball Player”. If I said the sentence “Stephen Curry is a Basketball Player”, even if you aren’t sure who Stephen Curry is, you already know some things about him because of the class he is in. As a Basketball Player, there are certain things he can do (dunk, dribble, and shoot) as well as certain things he keeps track of (points, assists, games won). In python, we call the things that an object can do “functions”, and we call the things that it keeps track of “attributes”.