Abstraction is, of course, common to all software design. Object oriented programming analyzes in terms of the basic data types, or objects it involves.
Where OO design differs from procedural design (like that of C for example) is that it provides a mechanism to make basic data types intelligent by building the methods for operating on the basic data types into the data types themselves. The resulting structure is called a class. Collecting data and the functions that operate on them together is called encapsulation.
In most situtations, there will be many closely related basic data types that differ only slightly. A "dog" class will have "Collie" and "Dalmation" subclasses. OO provides a way of collecting common data and methods like "weight" and "barking" into a parent class "dog", and adding specific data like "TV appearances" and "show spots" to the subclasses. One says the subclasses inherit the data and methods of their parent class.
A class may have two methods with the same name, but that accept different kinds of arguments. Similarly, subclasses may redefine methods that have the same name as methods in the parents class. A key feature of taking full advantage of the other OO design features is the ability of the runtime system to intelligently decide which method should apply by context. Support for this behavior is called polymorphism.
Comments to:
webmaster@www.geom.uiuc.edu
Created: May 31 1996 ---
Last modified: May 31 1996