Solved

Object Oriented

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

Expert Comment

by:nietod
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.
0
 
LVL 1

Accepted Solution

by:
darkskyz earned 20 total points
ID: 2721141
Here is an excerpt from www.whatis.com:

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.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now