Object Oriented

Posted on 2000-04-15
Last Modified: 2010-04-02
What is object oriented programming.
give me detailed information.
Question by:aleemjee
LVL 22

Expert Comment

ID: 2719114
20 points doesn't buy much in the way of detail, but actually, if you want a lot of details you should be looking into books on it anyways.

Structured program (a common name for the alterative) concentrates tasks that must be performed.  i.e you write procedures and other control structures for performing task.  These procedures are passed information--data--they need to work with.  The program is generally organized around the tasks that need to be done.

OOP however conentrates on data and associating that data with procedures that manipulate the data.  A single instance of data and the procedures that manipulate it are called a object.   The program is generally organizes arround classes or objects that maintain a partiuclar type of data for the program.

For example, A program that maintains a phone book coudl be written either way (any program can be written either way).  In structured programming, you might write procedures for loading the phoen book from disk, saving it to disk, adding an entry, deleting an entry, looking up an entry etc.  Each of these procedures would be passed the data it needs to work with.   In OOP you would create a class that stores the phone book.  This class would also contain procedures that operate on the data, like to load it from disk, save it to disk, add an entry, delete an entry, etc.  So you have the same sorts of functions  in both cases, but they are orginized differently.  The general focus in creating the two programs is different, one concentrates on writting tasks that work with data specified to them.  The other on creating classes that are both data and the tasks that work with that data.

Accepted Solution

darkskyz earned 20 total points
ID: 2721141
Here is an excerpt from

OOP (object-oriented programming)

A revolutionary concept that changed the rules in computer program development, object-oriented
programming (OOP) is organized around objects rather than actions, data rather than logic. Historically, a
program has been viewed as a logical procedure that takes input data, processes it, and produces output data.
The programming challenge was seen as how to write the logic, not how to define the data. Object-oriented
programming takes the view that what we really care about are the objects we want to manipulate rather than
the logic required to manipulate them. Examples of objects range from human beings (described by name,
address, and so forth) to buildings and floors (whose properties can be described and managed) down to the
little widgets on your computer desktop (such as buttons and scroll bars).

The first step in OOP is to identify all the objects you want to manipulate and how they relate to each other, an exercise often
known as data modeling. Once you've identified an object, you generalize it as a class of objects (think of Plato's concept of the
"ideal" chair that stands for all chairs) and define the kind of data it contains and any logic sequences that can manipulate it.
The logic sequences are known as methods. A real instance of a class is called (no surprise here) an "object" or, in some
environments, an "instance of a class." The object or class instance is what you run in the computer. Its methods provide
computer instructions and the class object characteristics provide relevant data. You communicate with objects - and they
communicate with each other - with well-defined interfaces called messages.

The concepts and rules used in object-oriented programming provide these important benefits:

     The concept of a data class makes it possible to define subclasses of data objects that share some or all of the main class
     characteristics. Called inheritance, this property of OOP forces a more thorough data analysis, reduces development time,
     and ensures more accurate coding.
     Since a class defines only the data it needs to be concerned with, when an instance of that class (an object) is run, the code
     will not be able to accidentally access other program data. This characteristic of data hiding provides greater system
     security and avoids unintended data corruption.
     The definition of a class is reuseable not only by the program for which it is initially created but also by other
     object-oriented programs (and, for this reason, can be more easily distributed for use in networks).
     The concept of data classes allows a programmer to create new data types that are not defined in the language itself.

One of the first object-oriented computer languages was called Smalltalk. C++ and Java are the most popular object-oriented
languages today. The Java programming language is designed especially for use in distributed applications on corporate networks
and the Internet.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question