Object oriented programming has a few core concepts, which if you know them, will help you out tremendously!

The first is the concept of classes and objects, which is strangely overdone on the internet (and books for that matter).

The concept is extremely simple and maybe people over explain it. That’s probably the root of the confusion but I’m here to save the day!

Ready for it? Here you go:

  • A Class is a blueprint.
  • An Object is the thing made from that blueprint.

Yeah. Really. It’s that simple.

That means that there is generally one class but there can be many, many objects (as many as you like!).

In programming terms a class might look like this (Swift language here but could be any language):

So a class can have properties, functions and anything else common to whatever language you’re using (generally speaking).

Now for a bunch of objects made from that class:

Yeah, 3 objects all made from the same blueprint. Now I know that Ferrari, Ford and Nissan aren’t the same (Nissan’s better) but you get my point.

One class is used to create multiple objects.

Does that clear it up for you? If not, then please do comment!

 

Where to go Next

This tutorial comes straight out of The Complete iOS Developer Course. Over 40 hours long it contains everything you need to create awe inspiring apps fast!

Click here to check it out!

What is Object Oriented Programming? Classes and Objects

Leave a Reply

Your email address will not be published. Required fields are marked *

Share This

Want this Post in Easy to Understand Video Form?

Then get the Complete iOS Developer Course. Over 50 hours of pure Swift coding goodness designed to turn you into a coding master!

One Time Offer - $9! Click to Get it!



WARNING: Once this box is closed the offer will not be shown again.

Thank you!