Classes and Objects

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

Solution
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.

Comments
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.

Examples
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:

WordPress.com Logo

You are commenting using your WordPress.com 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