Alan Freedman -- The Computer Language Company - Computer Desktop Encyclopedia
Computer Desktop Encyclopedia
Longest-Running Tech Reference on the Planet

A CDE Definition

You'll love The Computer Desktop Encyclopedia (CDE) for Tech Term of the Day (TTOD)


virtual function

In object technology, a function that has a default operation for a base class, but which can be overridden and perform a different operation by a derived class. A derived class inherits the attributes (data) and methods (processing) of a higher-level class. See object-oriented programming.

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 are stored in a traditional relational database or in an object database if the data have a complex structure. See O-R mapping and object database.

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

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

Personal Use Only

Before/After Your Search Term
virtual electronic recordvirtual funds
virtual employeevirtual goods
virtual employmentvirtual greeting card
virtual environmentvirtual hard drive
Virtual Execution Systemvirtual headphones
virtual faxvirtual headset
virtual faxingvirtual home button
virtual fingerprintvirtual host
virtual floppy drivevirtual hosting
virtual foldervirtual hypertext

Terms By Topic
Click any of the following categories for a list of fundamental terms.
Computer Words You Gotta KnowSystem design
Job categoriesUnix/Linux
Interesting stuffPersonal computers
InternetIndustrial Automation/Process Control
Communications & networkingAssociations/Standards organizations
HistoryDesktop publishing
ProgrammingHealthcare IT
System design