object-oriented programming
8 ResultsDictionary
object-oriented programming
Writing software that supports a model wherein the data and their associated processing (called "methods") are defined as self-contained entities called "objects." Object-oriented programming...
Dictionary
Definition: object-oriented programming
Writing software that supports a model wherein the data and their associated processing (called "methods") are defined as self-contained entities called "objects." Object-oriented programming (OOP) languages, such as C++ and Java, provide a formal set of rules for creating and managing objects. The data in an object model can be stored in the traditional table structure of a relational database (see O-R mapping) or, if the object model is very complex, in an object database, which is designed to hold object data (see object database).
Encapsulation, Inheritance and Polymorphism
There are three major features in object-oriented programming: encapsulation, inheritance and polymorphism.
Encapsulation Enforces Modularity
Encapsulation refers to the creation of self-contained modules that bind processing functions to the data. These user-defined data types are called "classes," and one instance of a class is an "object." For example, in a payroll system, a class could be Manager, and Pat and Jan could be two instances (two objects) of the Manager class. Encapsulation ensures good code modularity, which keeps routines separate and less prone to conflict with each other.
Inheritance Passes "Knowledge" Down
Classes are created in hierarchies, and inheritance allows the structure and methods in one class to be passed down the hierarchy. That means less programming is required when adding functions to complex systems. If a step is added at the bottom of a hierarchy, then only the processing and data associated with that unique step needs to be added. Everything else about that step is inherited. The ability to reuse existing objects is considered a major advantage of object technology.
Polymorphism Takes any Shape
Object-oriented programming allows procedures about objects to be created whose exact type is not known until runtime. For example, a screen cursor may change its shape from an arrow to a line depending on the program mode. The routine to move the cursor on screen in response to mouse movement would be written for "cursor," and polymorphism allows that cursor to take on whatever shape is required at runtime. It also allows new shapes to be easily integrated.
OOP Languages
Used for simulating system behavior in the late 1960s, SIMULA was the first object-oriented language. In the 1970s, Xerox's Smalltalk was the first object-oriented programming language and was used to create the graphical user interface (GUI). Today, C++ and Java are the major OOP languages, while C#, Visual Basic.NET, Python and JavaScript are also popular. ACTOR and Eiffel were earlier OOP languages. The following list compares some basic OOP terms with traditional programming. See object-oriented DBMS.
OOP Traditional Programming
class description of
data + processing
object
(instance) actual data + processing
attribute actual data (a field)
method function that processes a
particular structure
message function call
instantiate allocate a structure
Object Modeling
When information systems are modeled as objects, they can employ the powerful inheritance capability. Instead of building a table of employees with department and job information in separate tables, the type of employee is modeled. The employee class contains the data and the processing for all employees. Each subclass (manager, secretary, etc.) contains the data and processing unique to that person's job. Changes can be made globally or individually by modifying the class in question.
THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2010 The Computer Language Company Inc. All rights reserved.
Sponsored White Papers, Webcasts & Resources
-
Enable Administrators to Morph into Managers by Leveraging Real-time Analytics and Automation
Take a look at this white paper to learn more about using real-time analytics and automation to get more out of your IT admins and make your network easier to manage.
-
Learn to develop iOS apps for free
Apple offers up six books at no charge on developing for iOS
-
Twitter's Alex Payne on functional programming languages
Editor's note: Andrew Mager is reporting from the Future of Web Apps (FOWA 2010) conference, held in Miami from February 22 to 24. Click here to read all of his coverage. It's 2010. And we have...
-
Teaching object-oriented programming with Greenfoot
Another topic I covered with during my interview with Sun Microsystems' Joe Hartley was "Greenfoot," a tool that Sun helped develop (providing financial and consultative support to the developers)...
-
SlideShare: user communication failure
While Enterprise 2.0 applications can be useful, hassles sometimes abound. In this case, I innocently tried to upload a simple file to SlideShare, only to learn things aren't always...
-
Oddball thinking about OOP
The key reason no one's been able to make OOP ideas work in IT is that we use digital computers, and the OOP ideas apply mainly to analog computation.
-
-
The tattered history of OOP
OOP has been a mixed bag, but I say this only because like with the PC, the creative vision of OOP was lost. What follows is largely based on Alan Kay's presentation called "The Computer...
-
Is OOP a branch to nowhere?
No one would consider the COBOL MOVE statement to represent object oriented programming - but on close inspection it meets the criteria and that fact both undermines the entire basis for the OO...
-
Getting a handle on Web services
A service-oriented model for Web services can help keep development processes under control, says Builder.com.
Additional Results
-
Xamarin abandons its Silverlight for Linux technology
Moonlight, the open-source implementation of Silverlight for Linux and Unix, is no more.
-
Disaster recovery needs leading SMBs to cloud
At least one-third of small businesses in a Symantec study pointed to data backup as a big consideration for their move to the cloud, echoing other research.
-
Visual Studio LightSwitch: Will it emerge from sleeper status?
The first version of Microsoft's Visual Studio LightSwitch dev tool has achieved only modest traction in the market. Here's a set of recommendations from an ardent supporter of the product.
-
Google kicks Oracle in its patent teeth
Oracle loses its patent claims and so Google has almost completely defeated Oracle in its vain attempts to squeeze an intellectual property payoff from Google and Android.
-
DARPA's vision for getting instant satellite pics to troops (photos)
The SeeMe program seeks to develop a constellation of small low-orbit "disposable" satellites to provide on-demand imagery to troops.
-
Learning to program at age 30: here's how I'm approaching it
After 12 years, I've finally found what I needed to take the plunge into programming. So as to help others like me who have been interested, but could never quite flesh it out, here's how I'm...
-
Researchers spot fake mobile antivirus scanners on Google Play
Security researchers from AegisLab have spotted numerous fake mobile antivirus scanners, currently available for download at Google's Play marketplace.
-
Android chief called back in Oracle-Google trial to discuss patents
Andy Rubin comes back to court, and Oracle and Google attorneys discuss the importance of mobile OEMs in this trial.
-
The muddled mess of the Oracle vs. Google trial
There were no winners in Oracle vs. Google. Only losers, including all programmers, and perhaps everyone else as well.
-
After mixed copyright win over Google, Oracle looks towards patents
The next phase of the trial will consider whether or not Google violated two patents associated with Java.
-
Oracle-Google jury deliberations placed on temporary hold
The drama surrounding the jury in Oracle v. Google has heightened, causing deliberations to be briefly placed on hold on Monday.
-
Oracle-Google jury close to verdict; 'impasse' on one question
The jury has come to unanimous decisions on all questions but one in the copyright segment of Oracle v. Google.
The best of ZDNet, delivered
ZDNet Newsletters
Get the best of ZDNet delivered straight to your inbox




