Elements of the Object Model

The four major elements of the object model (the conceptual framework of an object-oriented thing) are —

  1. Abstraction
  2. Encapsulation
  3. Modularity
  4. Hierarchy

and the three minor elements are —

  1. Typing
  2. Concurrency
  3. Persistence.

The major elements are essential whereas the minor ones are useful but not essential. Now we try to elaborately define major elements and minor elements.

 

Major Elements

The major elements are listed below.

1. Abstraction

Abstraction is one of the fundamental way in which we as humans cope with complexity. An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects. Thus it provides crisply defined conceptual boundaries, relative to the perspective of the viewer.

We can characterize the behavior of an object by considering the services that it provides to other objects as well as the operations that it may perform upon other objects. A protocol denotes the way in which an object may act or react and thus constitutes the entire static and dynamic outside view of the abstraction.

2. Encapsulation

Encapsulation is the process of compartmentalizing the elements of an abstraction that constitutes its structure and behavior. Encapsulation serves to separate the contractual interface of an abstraction and its implementation. Abstraction and encapsulations are complimentary concepts.

3. Modularity

Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.

4. Hierarchy

Hierarchy is a ranking of ordering of abstractions. The two most important hierarchies in a complex system are its class structure (‘is a’ or Generalization/specialization) and object structure (‘part of’ or whole part). Inheritance is the most important ‘is a” hierarchy. Basically inheritance defines a relationship among classes wherein one class shares the structure or behavior defined in one or more classes.

 

Minor Elements

The minor elements are listed below.

Typing

Concepts of typing derive primarily from theories of abstract data types. A type is a precise characterization of structural or behavioral which a collection of entities all share. Typing is the enforcement of the class of an object, such that objects of different types may not be interchanged, or at the most, they may be interchanged only in very restricted ways.

Concurrency

It is the property that distinguishes an active object from one that is not active.

Persistence

Is the property of an object through which its existence transcends time (i.e. the object continues to exist after its creator ceases to exist) and/or space (i.e. the object’s location moves from the address space in which it was created).