Ooad 1
Ooad 1
Ooad 1
UNIT-I:
Introduction: The Structure of Complex systems, The Inherent Complexity of Software,
Attributes of Complex System, Organized and Disorganized Complexity, Bringing Order
toChaos, Designing Complex Systems, Evolution of Object Model, Foundation of Object
Model,Elements of Object Model, Applying the Object Model.
Introduction:
Systems: Systems are constructed by interconnecting components (Boundaries, Environments,
Characters, Emergent Properties), which may well be systems in their own right. The larger the
number of these components and relationships between them, higher will be the complexity of
the overall system.
Software Systems: Software systems are not any different from other systems with respect to
these characteristics. Thus, they are also embedded within some operational environment, and
perform operations which are clearly defined and distinguished from the operations of other
systems in this environment. They also have properties which emerge from the interactions of
their components and/or the interactions of themselves with other systems in their environment.
A system that embodies one or more software subsystems which contribute to or control a
significant part of its overall behavior is what we call a software intensive system.
Examples of complex software- intensive systems, we may consider stock and production
control systems, aviation systems, rail systems, banking systems, health care systems and so on.
Complexity: Complexity depends on the number of the components embedded in them as well
as the relationships and the interactions between these components which carry;
• Impossible for humans to comprehend(grasp) fully
• Difficult to document and test
• Potentially inconsistent or incomplete
• Subject to change
• No fundamental laws to explain phenomena and approaches
The structure of Matter: Nuclear physicists are concerned with a structural hierarchy of matter.
Atoms are made up of electrons, protons and neutrons. Elements and elementary particles but
protons, neutrons and other particles are formed from more basic components called quarks,
which eventually formed from pro-quarks.
The structure of Social institutions: In social institutions, group of people join together to
accomplish tasks that can be done by made of divisions which in turn contain branches which in
turn encompass local offices and so on.
integrated with existing legacy applications. This results into interoperability problems caused by
the heterogeneity of the different components which introduce new complexities.
The canonical form of a complex system – the discovery of common abstractions and
mechanisms greatly facilitates are standing of complex system. For example, if a pilot already
knows how to fly a given aircraft, it is easier to know how to fly a similar one. May different
hierarchies are present within the complex system. For example an aircraft may be studied by
decomposing it into its propulsion system. Flight control system and so on the decomposition
represent a structural or "part of" hierarchy. The complex system also includes an "Is A"
hierarchy. These hierodules for class structure and object structure combining the concept of the
class and object structure together with the five attributes of complex system, we find that
virtually all complex system take on the same (canonical) form as shown in figure. There are two
orthogonal hierarchies of system, its class structure and the object structure.
The figure 1.1 represents the relationship between two different hierarchies: a hierarchy of
objects and a hierarchy of classes. The class structure defines the 'is-a' hierarchy, identifying the
commonalities between different classes at different levels of abstractions. Hence class C4 is also
a class C1 and therefore has every single property that C1 has. C4, however, may have more
specific properties that C1 does not have; hence the distinction between C1 and C4. The object
structure defines the 'part-of' representation. This identifies the composition of an object from
component objects, like a car is composed from wheels, a steering wheel, a chassis and an
engine. The two hierarchies are not entirely orthogonal as objects are instances of certain classes.
The relationship between these two hierarchies is shown by identifying the instance-of
relationship as well. The objects in component D8 are instances of C6 and C7 As suggested by
the diagram, there are many more objects then there are classes. The point in identifying classes
is therefore to have a vehicle to describe only once all properties that all instances of the class
have.
Example:
• More than one type of hierarchies may be present in complex system
• Computer (Part of)
• CPU, Input Devices, Output Devices
certain cells in a leaf and ignore all other parts such as roots and stems. Objects are abstractions
of entities in the real world.
In general abstraction assists people's understanding by grouping, generalizing and chunking
information.
Object-orientation attempts to deploy abstraction. The common properties of similar objects are
defined in an abstract way in terms of a class. Properties that different classes have in common
are identified in more abstract classes and then an ‘is-a’ relationship defines the inheritance
between these classes.
The role of Hierarchy: Identifying the hierarchies within a complex software system makes
understanding of the system very simple. The object structure is important because it illustrates
how different objects collaborate with one another through pattern of interaction (called
mechanisms). By classifying objects into groups of related abstractions (for example, kinds of
plant cells versus animal cells, we come to explicitly distinguish the common and distinct
properties of different objects, which helps to master their inherent complexity.
Different hierarchies support the recognition of higher and lower orders. A class high in the ‘is-
a’ hierarchy is a rather abstract concept and a class that is a leaf represents a fairly concrete
concept. The ‘is-a’ hierarchy also identifies concepts, such as attributes or operations, that are
common to a number of classes and instances thereof. Similarly, an object that is up in the part-
of hierarchy represents a rather coarse-grained and complex objects, assembled from a number of
objects, while objects that are leafs are rather fine grained. But note that there are many other
forms of patterns which are non hierarchical: interactions, ‘relationships’.
The role of Decomposition: Decomposition is important techniques for copying with
complexity based on the idea of divide and conquer. In dividing a problem into a sub problem
the problem becomes less complex and easier to overlook and to deal with. Repeatedly dividing
a problem will eventually lead to sub problems that are small enough so that they can be
conquered. After all the sub problems have been conquered and solutions to them have been
found, the solutions need to be composed in order to obtain the solution of the whole problem.
The history of computing has seen two forms of decomposition, process-oriented (Algorithmic)
and object-oriented decomposition.
1.Algorithmic (Process Oriented) Decomposition: In Algorithmic decomposition, each module
in the system denotes a major step in some overall process.
2.Object oriented decomposition: Objects are identified as Master file and check sum which derive
directly from the vocabulary of the problem as shown in figure. We know the world as a set of
autonomous agents that collaborate to perform some higher level behavior. Get formatted update thus
does not exist as an independent algorithm; rather it is an operation associated with the object file of
updates. Calling this operation creates another object, update to card. In this manner, each object in
our solution embodies its own unique behavior .Each hierarchy in layered with the more abstract
classes and objects built upon more primitive ones especially among the parts of the object structure,
object in the real world. Here decomposition is based on objects and not algorithms.
The Elements of Software design Methods: Design of complex software system involves an
incremental and iterative process. Each method includes the following:
1. Notation: The language for expressing each model.
2. Process: The activities leading to the orderly construction of the system's mode.
3. Tools: The artifacts that eliminate the medium of model building and enforce rules about the
models themselves, so that errors and inconsistencies can be exposed.
The models of Object Oriented Development: The models of object oriented analysis and
design reflect the importance of explicitly capturing both the class and object hierarchies of
the system under design. These models also over the spectrum of the important design
decisions that we must consider in developing a complex system and so encourage us to craft
implementations that embody the five attributes of well formed complex systems.
- In large application system, classes, objects and modules essential yet insufficient means of
abstraction.
Each requires a different mindset, a different way of thinking about the problem. Object model is the
conceptual frame work for all things of object oriented.
There are four major elements of object model. They are:
1. Abstraction
2. Encapsulation
3. Modularity
4. Hierarchy
There are three minor elements which are useful but not essential part of object model. Minor
elements of object model are:
1. Typing
2. Concurrency
3. Persistence
Abstraction
Abstraction is defined as a simplified description or specification of a system that emphasizes some
of the system details or properties while suppressing others. A good abstraction is one that
emphasizes details that are significant to the reader or user and suppresses details that are, not so
significant, immaterial.
An abstraction denotes the essential characteristics of an object that distinguishes it from all other
kinds of objects and thus provides crisply defined conceptual boundaries on the perspective of the
viewer. An abstraction focuses on the outside view of an object, Abstraction focuses up on the
essential characteristics of some object, relative to the perspective of the viewer. From the most to
the least useful, these kinds of abstraction include following.
- Entity abstraction: An object that represents a useful model of a problem domain or solution
domain entity.
- Action abstraction: An object that provides a generalized set of operations all of which program
the same kind of function.
- Virtual machine abstractions: An object that groups together operations that are used by some
superior level of control, or operations that all use some junior set of operations.
- Coincidental abstraction: An object that packages a set of operations that have no relation to
each other.
Encapsulation
The act of grouping data and operations into a single object
Modularity
The act of partitioning a program into individual components is called modularity. It is reusable
component which reduces complexity to some degree. Although partitioning a program is helpful for
this reason, a more powerful justification for partitioning a program is that it creates a number of
well-defined, documented boundaries within the program. These boundaries, or interfaces, are
invaluable in the comprehension of the program. In some languages, such as Smalltalk, there is no
concept of a module, so the class forms the only physical unit of decomposition. Java has packages
that contain classes. In many other languages, including Object Pascal, C++, and Ada, the module is
a separate language construct and therefore warrants a separate set of design decisions. In these
languages, classes and objects form the logical structure of a system; we place these abstractions in
modules to produce the system’s physical architecture. Modularization consists of dividing a
program into modules which can be compiled separately, but which have connections with other
modules. Modularity is the property of a system that has been decomposed into a set of cohesive and
loosely coupled modules.
- modules can be compiled separately. modules in C++ are nothing more than separately compiled
files, generally called header files.
- Interface of module are files with .h extensions & implementations are placed in files with .c or .cpp
suffix.
- Modules are units in pascal and package body specification in ada.
- modules Serve as physical containers in which classes and objects are declared like gates in IC of
computer.
- Group logically related classes and objects in the same module.
- E.g. consider an application that runs on a distributed set of processors and uses a message passing
mechanism to coordinate their activities.
- A poor design is to define each message class in its own module; so difficult for users to find the
classes they need. Sometimes modularization is worse than no modulation at all.
- Developer must balance: desire to encapsulate abstractions and need to make certain abstractions
visible to other modules.
- Principles of abstraction, encapsulation and modularity are synergistic (having common effect)