May 2019
Intermediate to advanced
546 pages
12h 41m
English
To go over what we have just done and to explain the concept of a class and an instance a bit more clearly, let's take a look at the following screenshot and explanation:

A class acts as a blueprint to create objects from. In this example, we created a class called Car. This Car class acts as a blueprint to build instances of cars from. So, because it's a blueprint, we define what each car has in the class—these are called member variables (in our case, that's a model, a brand, and a color). We also define actions that a car can perform and what a car can do, and we call these methods! In our car example, we ...
Read now
Unlock full access