ie8 fix

object-oriented programming

8 Results

Dictionary

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-oriented programming

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.





Sponsored White Papers, Webcasts & Resources

  • Learn to develop iOS apps for free

    Apple offers up six books at no charge on developing for iOS

    Blog posts | December 21, 2010 9:21pm PST

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

    Blog posts | February 23, 2010 9:18am PST

  • 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)...

    Blog posts | October 20, 2008 3:02am PDT

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

    Blog posts | June 29, 2008 9:20am PDT

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

    Blog posts | June 3, 2008 12:15am PDT

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

    Blog posts | June 2, 2008 12:15am PDT

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

    Blog posts | April 20, 2008 10:26am PDT

  • Getting a handle on Web services

    A service-oriented model for Web services can help keep development processes under control, says Builder.com.

    News items | October 24, 2002 12:00am PDT

Additional Results

ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

ie8 fix