Object Oriented Modeling

Object orientation is a style of modeling and software engineering. In a general sense, object orientation takes specific metaphors associated with how physical objects are characterized, and uses these metaphors as a tool for model design, and ultimately programming design and implementation. This physical metaphor has a natural fit within a topic such as ecosystems since the spatial extent of the ecosystem as well as all species residing in that space can be seen as 'objects'. One develops an 'OO model' and then locates a suitable programming language that embodies object orientation as its primary architecture. The OO approach uses two fundamental ideas: 'encapsulation' and 'inheritance'. With encapsulation, it is possible to locate computer code and data 'within' an object so that the code and data become addressable and located by first querying the object for its contents. Code within an object is termed a 'method' or 'behavior' and data is an 'attribute'. With inheritance, objects become leaf-nodes on a tree whose root represents the most abstract category (or 'class') and whose children represent subcategories (or 'subclasses').

An example of encapsulation and inheritance can be seen by taking the domain of fish. The shark and stone-fish are two types of 'fish'. One then can define an OO class called 'Fish' and two subclasses called 'Shark' and 'Stonefish'. One aspect of building this hierarchy is to take advantage of the process of inheritance, but before discussing that we first need to employ encapsulation in this example. A fish is composed of a skeleton, a central-nervous system, skin, and internal organs, among many other parts. These parts make up a hierarchy that defines encapsulation. It is reasonable to imagine that to obtain attribute information on the type and format of a skeleton, one would get this by going directly to a specific, unique fish-perhaps a specific shark we will call shark_1032 for lack of a better identifier. Inside of the object shark_1032, we can find all information that this object encapsulates: the size of the object, its skeletal components, and so forth. Now, getting back to the issue of inheritance, it seems clear from the biological taxonomy of fish that both sharks and stonefish both have skeletons. So, we can move the data structure that contains the data for a skeleton and place it in the 'Fish' class. The classes Shark and Stonefish inherit all methods and attributes of Fish. Often, this process is termed inheritance of derived classes (Shark, Stonefish) from the base class (Fish).

So, not only does OO design support a new way of thinking about modularity, it supports encapsulation of attributes and methods as well as ways in which these are 'moved' (i.e., inherited-by) other components. It is worth closing this section with a description of how object orientation differs from prior ways of thinking about program design as well as where all of this new thought will lead in the future. Prior to object orientation, while most real world scenarios were described using words such as 'objects' and 'attributes', programs were defined in terms of procedures that encapsulated information in the form of simple and complex data. The computer language FORTRAN is a good example of this: the language was composed of functions and subroutines, and data were stored either globally (i.e., for all subroutines to use) or locally (i.e., within that particular subroutine). Procedural approaches such as the one used in FORTRAN are still used in OO (i.e., a method); however, the key difference in the evolution of programming is the introduction of additional encapsulation of objects, either of the physical variety (i.e., 'shark_1032') or the conceptual variety (i.e., 'budget').

Was this article helpful?

0 0
Oplan Termites

Oplan Termites

You Might Start Missing Your Termites After Kickin'em Out. After All, They Have Been Your Roommates For Quite A While. Enraged With How The Termites Have Eaten Up Your Antique Furniture? Can't Wait To Have Them Exterminated Completely From The Face Of The Earth? Fret Not. We Will Tell You How To Get Rid Of Them From Your House At Least. If Not From The Face The Earth.

Get My Free Ebook


Post a comment