Alex Rivera | Logout

Defining OOP for a new programmer

Asked 2009-02-28T01:09:55.580
15

In teaching a first language to someone with no programming background I am having a hard time defining OOP despite the fact that I prefer OOP, how can I define OOP to someone with little (or zero) programming experience?

oop
Edit
Report

1 Answer

1

Any explanation of OOP depends strongly on the explainer's interpretation of the concept. My interpretation of the concept goes something like this.

The real world is largely understood as a set of actors. Each actor has a collection of properties and behaviors. In most cases, the properties of an actor is expressed in terms of it's behaviors, in relation to its interaction with other actors.

A computer program is usually a simulation of some real-world process, so it usually helps the programmer to build the program based on a actors-behaviors-properties model. That is, each element of the whole program can be divided into smaller programs that represent single actors.

Of course you can only take that so far. Not everything we want to model is a single actor. For instance, currency is conserved, but in many ways infinitely sub dividable.

Also, other ways of modeling the real world may offer more rigorous correctness guarantees at the cost of a greater abstraction, such as a relational model, which derives from set theory. OOP has no such mathematical foundation.

answered 2009-02-28T02:56:36.367

Your Answer