Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Object Oriented Programming explained to 10 year olds

By Morgan Prior & Ashish Dixit

Objects are things that you can see around you. The chair is an object. The toys you have are objects. Robots are objects. Objects can be defined based on how they look and what they can do. For example, you can define a car as a red car or a fast car. When you say red, you are talking about physical features and when you say fast, you are talking about their abilities.

Objects form different groups based on their similarities & differences. Car is one kind of object while Robots are another. Within Robots there are household robots like the roomba that vaccums your carpet then there are cooler robots like the transformers. However, both transformers and the roomba in your house share certain similarities. So you can say that both roomba & Transformers inherit certain characteristics that are common to all robots and have additional features that separate them apart.

Now if you look more into Transformers (because frankly robots that vacuum are not that cool), you will see that they share the common ability to change from one shape to another but how exactly this happens is different for different kinds of Transformers. For example, Optimus Prime can transform into a Robot from a truck while Bumblebee transforms from a Camaro into a Robot. So you can say that all Transformers can change their appearance but the way in which they do it and the shape they take depends on what kind of Transformer they are.

Copy link

anteaya commented Oct 4, 2010

I like the language and I like the examples.

So far so good. Now how do we take this and relate it to programming?

The original question is: What is an object and why is it important to me?

Can we extend what is happening here and move toward the answer to the question, why is it important to me?

Copy link

tundal45 commented Oct 5, 2010

Yeah, we kind of missed that part. I am definitely interested in exploring this further with Ali later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment