Say I am talking about car. You must be wondering which car? Which brand? What specification? When we are talking about car, you dont know sepcification but you have idea that I am talking about entity that has 4 wheels, engines, interior, etc.
Say now I say animal. Again you dont know which animal, but you have a picture of animal.
No specification, but still an idea!! - class
We classify a real world entity, so class means a classification of real world object or a blueprint. You can't see, feel, use in real world. It is just a concept.
Suppose I created a class car and I defined variable and functions so as to satisfy the imagination you made.
Say I say Audi variable/variant of class car and we call it object. Object is real world entity which you can feel, use. So Audi, Ferrari are objects of class car. Now they have general features of car and some additional features of their own.
For any doubts, email at conceptsindepthandeasy@gmail.com
#python #OOPs #class #object
Негізгі бет 1. Introduction | Classes and Objects | OOPs | Python
No video
Пікірлер