OOP

Objects Everywhere...


The first step in understanding Object Oriented Programming (OOP) or Design (OOD) is understanding objects. If you are a procedural programmer it takes a minute. But when you get it... it hits you like a brick.

Objects are fun... objects are cool... most of all... objects are useful. Objects are like pockets... places to store collections of data. Objects are like tools... they perform tasks. Objects are like Bee's... they have a hierarchy.

Objects break processing down into smaller parts... Divide and Conquer! AND objects save a lot of work ... because they're all about reusable code.

CREATED 2013-01-06 16:27:42.0

00-19-3B

UPDATED 2021-04-20 10:50:56.0

They Didn't Start Out That Way...


In the beginning... objects start out as classes... that's where the code goes. Classes are instantiated into objects.

A class is a blue print or a plan. It is compiled into object or byte code and an object gets instantiated from it. Each class can make many objects. Some classes are boss classes and boss around other classes.

Some classes don't get instantiated into objects in the traditional way. They have to be instantiated (born) in a special way because of what they represent or the functions that they perform. For example... objects that represent physical hardware must be created in other ways than normal objects are created... there can't be too many of them around... they're special.

CREATED 2013-02-17 23:42:16.0

00-19-F9

UPDATED 2021-04-20 10:50:57.0

He Has His Fathers Eyes...


All objects have at least one parent! Not a Mother or a Father... but a parent or parent(s). The object is then said to be a decendant or a child. Decendant objects inherit all of the characteristics of thier parent(s)... but not always directly.

Parent objects are allowed to keep secrets from thier decendants or children under the laws of scope, visibility and encapsulation which is a whole methodology about keeping secrets. The decendants may or may not be able to get the secrets... but they will have to ask permission.

Encapsulation is not just about keeping secrets from decendants... it's about keeping secrets. Under encapsulation, some objects keep information soooo secret... they tell no one. Not because they don't want to... because they can't. But that's another topic.

CREATED 2013-02-17 23:48:16.0

00-19-FA

UPDATED 2021-04-20 10:50:58.0

Knowledge

L
I
N
K
S

DBID: db.wam

Page Server: Ruger

©2012 Leistware Data Systems

      Hello anonymous