Introduction to Object-Oriented Programming

Programming:

Program -- A list of instructions for a computer to execute.

Evolution of languages:

Computers need machine code instructions, but programmers would like to read and write programs on a higher level.  High-level languages like C and Pascal are also known as procedural languages.  They allow the writing of procedures and functions for code modularity, often dividing the work into separate actions.  High level languages are much more readable for programmers.  Since the computer still needs machine code instructions, high-level languages are usually run through a compiler, which translates high-level code into the machine's own instructions.

Object-oriented languages, like C++ and Java, take this a step further and encapsulate their data and procedures together in units called objects, which contain more than just functions (actions, often representable by verbs).  These languages make items modular as well (objects, or things representable by nouns).  Object-oriented languages are also high-level languages, more readable for people, and needing translation for the machine (by a compiler or interpreter).

C is a high-level procedural programming language.
C++ is an object-oriented programming language based on C.
 

Classes and Objects:

What's so special about objects?

The C language has a similar concept called a struct.  What's the difference?  A struct consists of:

So, what's the difference?

C++ libraries can contain useful classes of objects that store data in useful and reusable ways.  Classes become building blocks for use in other programs.