Tuesday, June 7, 2011

Stuff = Object = (attributes and behaviors)

The starting point for understanding object oriented programming is to understand the nature of stuff. Programming started as step-by-step instructions for a computer to execute. If you changed the objective, you had to change the directive. Procedural programming made life a bit easier by allowing programmers to write methods for types of behaviors. If you were collecting names and addresses a procedural program would process a series of steps as one method for your collection. New person? New form, new identification number, etc. While this was better, it wasn't ideal. The world is stuff, not just procedures. Object oriented programming was a revolution because it treated the inner world of the computer like the outer reality.

Object = (Attributes (are nouns), Behaviors (are verbs));

OOP recognizes that objects and their inherent attributes and behaviors are...inheritable. A human can be an educator; and educator can be a teacher; a teacher can be a math expert. The math expert inherits back to the person all of the attributes and behaviors, while at the same time being different in so many ways from an artist.

OOP creates a streamlined logic that resembles the world in the way that a high level language resembles English.