Disambiguating Class and Instance
00:00 Class and instance. Let’s clear up those terms a little bit, because you’ll be working very heavily with classes and instances, and it’s very important that you have a clear idea of what each means.
00:12 A class you can think of like a blueprint. You can think of it like a prototype or a model. The instance, on the other hand, is a specimen or a occurrence or an occasion. So in the case of a blueprint, you’d have a blueprint maybe for a car, and the instance would be the actual car.
00:46 And the instance of this class could be your dog Spike. Likewise, you can have the concept of a point in two-dimensional space with an x and y coordinate, and then you can have an instance of a point which is the center of a canvas that you’re going to draw on. And you can have the idea of a chair.
01:04 So everyone knows what a chair is. It’s something that you can sit on, but the instance is the actual chair or the many chairs that are available for you to sit on. Just to hammer this home, a class is like a blueprint, and an instance is something that is made from a blueprint.
Become a Member to join the conversation.