The idea behind object-oriented programming is that a computer program may be seen as comprising a collection of individual units, or objects, that act on each other, as opposed to a traditional view in which a program may be seen as a collection of functions, or simply as a list of instructions to the computer. Each object is capable of receiving messages, processing data, and sending messages to other objects. Each object can be viewed as an independent little machine or actor with a distinct role or responsibility. Procedural to OOP may help understanding the concept using code.
Object-oriented programming is claimed to promote greater flexibility and maintainability in programming, and is widely popular in large-scale software engineering. Furthermore, proponents of OOP claim that OOP is easier to learn for those new to computer programming than previous approaches, and that the OOP approach is often simpler to develop and to maintain, lending itself to more direct analysis, coding, and understanding of complex situations and procedures than other programming methods.
2006-07-18 20:38:57
·
answer #1
·
answered by Blue™ 4
·
0⤊
0⤋
Traditionally programming was done in steps... which gave rise to a term called Procedural programming. This meant that any function could be called by any other function. Sometimes this leads to a lot of unnecessary calls. Also makes it difficult to hide some details .. eg when you want to give out a library to some other person. All the function calls will be available.
But you dont want that to happen everytime.
That's where object oriented code/programming steps in.
In a simple way it means that everything is to be treated as an object.
For an example - lets try to make a car in OO. I will say I want 1 car so create 1 object of type car. When that object is getting created it will see that a car needs a body, an engine 4 tyres a chasis, 4 doors, etc. And will start to create all those as objects within itself. Here also it will see what kind of engine. E.g. a maruti 800 with have a 800cc suzuki engine while a honda city will have a 1.5L honda engine. But you hide from the user as to how the engine works. All you will give to the user is to "start the engine" , "switch off the engine" and hide the rest of the details about changing the valve opening and closing. You hide the implementation ... and make your interfaces cleaner.
If you notice - all the nouns above are objects. Each of the objects has a relationship with each other - either a "type-of" ( suzuki is a type of engine) or a "has-a" kind of relationship ( car has engine).
The kind of programming which enables this kind of programming is called object oriented programming.
Mostly, you will see OO code written in procedural type where none of the above considerations are taken into account and which defeats the purpose of OO. So, I suggest that you get hold of a book called "Design Patterns" ( its available for C++ and Java) and check it out. Its very confusing initially , but if you get those concepts you will be very good in OO.
2006-07-19 05:33:42
·
answer #2
·
answered by BikeNomad 2
·
0⤊
0⤋
Object Oriented means that the code is geared towards using "objects" to construct the code. What are objects? Objects are structures or classes. In essence, they are containers for many different things. Structures and classes are existences in code that are comprised of many things.
Example: You make a "clock" class/structure (the clock is the object). Well, a clock has three hands and numbers. These hands can also be objects if you decide that each hand should individually store its own position on the clock. If you choose the clock to store this position information, then the hands are not objects.
Object oriented programming can be very powerful.
2006-07-19 03:37:56
·
answer #3
·
answered by I Have The Answer 3
·
0⤊
0⤋
In computer science, object-oriented programming, OOP for short, is a computer programming paradigm that emphasizes the following concepts: * Objects - Packaging data and functionality together into units within a running computer program; objects are the basis of modularity and structure in an object-oriented computer program.* Abstraction - The ability for a program to ignore some aspects of the information that it is manipulating, i.e. the ability to focus on the essential and other concepts like class, encapsulation, inheritence,method,polymorphisim
2006-07-19 03:47:08
·
answer #4
·
answered by george 4
·
0⤊
0⤋
This is where the program consists of several objects, such as text boxes, labels and forms rather than the traditional collection of functions, processes and subroutines.
2006-07-19 03:35:07
·
answer #5
·
answered by runedragons2004 2
·
0⤊
0⤋
object oriented means the treatment of data in terms of object.
object is the instance of a class.
class is the collection of variables and methods that operate on variable datas.
so
you hava a class named BOX that has variables width,height and weight and methods volume that calculate volume.
if you make a object of box class that has variables hieght ,width,weight and methods volume
2006-07-19 03:51:32
·
answer #6
·
answered by jacky 2
·
0⤊
0⤋
It means problem is divided into small objects. then these are solved, as all the objects are achieved problem is solved.
This concept is helpful is error finding n debugging...
2006-07-19 04:02:34
·
answer #7
·
answered by Nits 1
·
0⤊
0⤋
Here is a book "Complete Reference"
by "Sheldit"...
you can have all informations about OBJECTS n OBJECT ORIENTED programming.
and really its tough to tell anybody about it...
2006-07-19 04:36:42
·
answer #8
·
answered by SuRGe 3
·
0⤊
0⤋