MAJOR AND MINOR ELEMENTS OF AN OBJECT MODEL
Sohail Saif
M.Tech(SE)
1
MAJOR AND MINOR ELEMENTS OF AN OBJECT MODEL
A object model forms a conceptual framework that brings about object orientation. It helps the analyst to
concentrate on the similarities and ignore the difference between entities. The elements of object model are
categorized into two models.
Major Elements: By major we mean without any of these four elements is not object oriented.
 Abstraction: In object oriented analysis and design, abstraction provides a mechanism for managing
and communicating complexity of the system. In object oriented programming abstraction aids in
reuse and encapsulation. An abstraction denotes the essential characteristics of an object that
distinguish it from other kinds of objects. It permits us to concentrate on similarities between objects.
For a particular viewer, it expose only the essential characteristics of an object while hiding its
inessential details. It thus helps us to model the real world object. A single entity may have many
abstractions.
Abstraction (Fig. 1)
Properties of good abstraction are:
o Abstractions should be well named.
o Abstractions should be coherent.
o Abstractions should be accurate.
o An abstraction should have only the minimal details of the entity.
o An abstraction should be complete.
Abstractions can be categorized as :
o Entity Abstraction.
o Action Abstraction
o Coincidental Abstraction
o Virtual Machine Abstraction
MAJOR AND MINOR ELEMENTS OF AN OBJECT MODEL
Sohail Saif
M.Tech(SE)
2
 Encapsulation: Encapsulation is the mechanism that binds both code and date it manipulates and
keeps both safe from outside interference and misuse. For Example, in the person class(Fig. 2),
setName() operation can only set or modify the name of the person while getName() operation is used
to obtain the name of the person. Encapsulation thus aids in data hiding by providing access to an
object’s data only through operations it offers. This is called an interface. These external interface
provides a set of methods that accepts and responds to a particular kind of message.
Fig. 2
 Modularity: Modularity deal with the portioning a program into individual components to reduce the
complexity of the system developed. Modularity is the property by which the system can be
decomposed into a set of cohesive and loosely coupled modules. These modules can be implemented,
compiled and tested separately. They can be linked together to form a complete executable program.
Encapsulation and Modularity provide a bar around the Abstraction.
 Hierarchy: Hierarchy is the ranking or ordering of abstraction. In complex systems, there are two most
important Hierarchies. They are the class and object structure Hierarchies. Class Hierarchy is the
mechanism that is used to express the similarity between classes. It portrays the
generalization/specialization relationship. Generalization tells us what are the similarities between the
classes and Specialization tells us the different between the classes. A generalized class is a superclass,
while a specialized class is subclass. For example person is the generalized class and employee and
customer is the specialized class of the person(Fig 3.1). The object hierarchy is represented using
aggregation . Aggregation is used to treat a collection of object as single object. For example, a car
consists of tyres and an engine (Fig 3.2).
MAJOR AND MINOR ELEMENTS OF AN OBJECT MODEL
Sohail Saif
M.Tech(SE)
3
Fig. 3.1 Fig. 3.2
Minor Elements: The minor elements can be absent in an object model But, if these elements are present in
the model then it useful.
 Typing: Typing of a class prevents objects of different types from being interchanged. Binding is the
association of the variables or classes to their types. The programming language can be categorized as
strongly typed or weakly typed language. In strongly typed languages, the violation of type
conformance can be detected at the compile time. This type of binding variables to their types called
static binding or early binding. In weakly typed languages, violation of typing conformance cannot be
detected until runtime. Here variable are bound to their type at only execution time. This is called as
dynamic binding or late binding. Static bind is fast but rigid while dynamic binding is slow but flexible
 Persistence: Every object in the system takes some amount of space and exists for an amount of time.
Persistency is the property by which an object transcends time and/or space. Here the object maintain
its state even after its creator ceases to exist. The object location also moves from the object space in
which it was created to another address space. The different type of persistence offered by
programming languages are:
o Maintenance of transient results in expression evaluation.
o Maintenance of local variables in procedure activations.
o Maintenance of global variables and heap items.
 Concurrency: Concurrency is the property by which a program has several threads of control. These
portions can be executed in parallel. To maintain consistency between these parallel threads of
execution, locking mechanism is used.
MAJOR AND MINOR ELEMENTS OF AN OBJECT MODEL
Sohail Saif
M.Tech(SE)
4
Elements of object model

Major and Minor Elements of Object Model

  • 1.
    MAJOR AND MINORELEMENTS OF AN OBJECT MODEL Sohail Saif M.Tech(SE) 1 MAJOR AND MINOR ELEMENTS OF AN OBJECT MODEL A object model forms a conceptual framework that brings about object orientation. It helps the analyst to concentrate on the similarities and ignore the difference between entities. The elements of object model are categorized into two models. Major Elements: By major we mean without any of these four elements is not object oriented.  Abstraction: In object oriented analysis and design, abstraction provides a mechanism for managing and communicating complexity of the system. In object oriented programming abstraction aids in reuse and encapsulation. An abstraction denotes the essential characteristics of an object that distinguish it from other kinds of objects. It permits us to concentrate on similarities between objects. For a particular viewer, it expose only the essential characteristics of an object while hiding its inessential details. It thus helps us to model the real world object. A single entity may have many abstractions. Abstraction (Fig. 1) Properties of good abstraction are: o Abstractions should be well named. o Abstractions should be coherent. o Abstractions should be accurate. o An abstraction should have only the minimal details of the entity. o An abstraction should be complete. Abstractions can be categorized as : o Entity Abstraction. o Action Abstraction o Coincidental Abstraction o Virtual Machine Abstraction
  • 2.
    MAJOR AND MINORELEMENTS OF AN OBJECT MODEL Sohail Saif M.Tech(SE) 2  Encapsulation: Encapsulation is the mechanism that binds both code and date it manipulates and keeps both safe from outside interference and misuse. For Example, in the person class(Fig. 2), setName() operation can only set or modify the name of the person while getName() operation is used to obtain the name of the person. Encapsulation thus aids in data hiding by providing access to an object’s data only through operations it offers. This is called an interface. These external interface provides a set of methods that accepts and responds to a particular kind of message. Fig. 2  Modularity: Modularity deal with the portioning a program into individual components to reduce the complexity of the system developed. Modularity is the property by which the system can be decomposed into a set of cohesive and loosely coupled modules. These modules can be implemented, compiled and tested separately. They can be linked together to form a complete executable program. Encapsulation and Modularity provide a bar around the Abstraction.  Hierarchy: Hierarchy is the ranking or ordering of abstraction. In complex systems, there are two most important Hierarchies. They are the class and object structure Hierarchies. Class Hierarchy is the mechanism that is used to express the similarity between classes. It portrays the generalization/specialization relationship. Generalization tells us what are the similarities between the classes and Specialization tells us the different between the classes. A generalized class is a superclass, while a specialized class is subclass. For example person is the generalized class and employee and customer is the specialized class of the person(Fig 3.1). The object hierarchy is represented using aggregation . Aggregation is used to treat a collection of object as single object. For example, a car consists of tyres and an engine (Fig 3.2).
  • 3.
    MAJOR AND MINORELEMENTS OF AN OBJECT MODEL Sohail Saif M.Tech(SE) 3 Fig. 3.1 Fig. 3.2 Minor Elements: The minor elements can be absent in an object model But, if these elements are present in the model then it useful.  Typing: Typing of a class prevents objects of different types from being interchanged. Binding is the association of the variables or classes to their types. The programming language can be categorized as strongly typed or weakly typed language. In strongly typed languages, the violation of type conformance can be detected at the compile time. This type of binding variables to their types called static binding or early binding. In weakly typed languages, violation of typing conformance cannot be detected until runtime. Here variable are bound to their type at only execution time. This is called as dynamic binding or late binding. Static bind is fast but rigid while dynamic binding is slow but flexible  Persistence: Every object in the system takes some amount of space and exists for an amount of time. Persistency is the property by which an object transcends time and/or space. Here the object maintain its state even after its creator ceases to exist. The object location also moves from the object space in which it was created to another address space. The different type of persistence offered by programming languages are: o Maintenance of transient results in expression evaluation. o Maintenance of local variables in procedure activations. o Maintenance of global variables and heap items.  Concurrency: Concurrency is the property by which a program has several threads of control. These portions can be executed in parallel. To maintain consistency between these parallel threads of execution, locking mechanism is used.
  • 4.
    MAJOR AND MINORELEMENTS OF AN OBJECT MODEL Sohail Saif M.Tech(SE) 4 Elements of object model