Classes and Objects

You want to know what classes and objects are and the differences between them.

Classes and objects are at the core of Object-Oriented programming (OOP). A class is a blueprint or template for creating objects, and objects are instances of a class.

Structured programming aims to solve problems with functions. OOP solves them with objects. Think of objects as custom data types. Classes give programmers a means to define their own data types.

Your pet dachshund is an object of the Dog class.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s