Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views20 pages

Slide 1

The document discusses Object Oriented Programming (OOP) and its relevance in managing software complexity through decomposition techniques. It contrasts Algorithmic Decomposition with Object Oriented Decomposition, highlighting the advantages of OOP in handling complex systems by organizing them into objects that interact through defined interfaces. The text emphasizes the importance of designing software to meet functional specifications while considering performance and resource limitations.

Uploaded by

f20221335
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views20 pages

Slide 1

The document discusses Object Oriented Programming (OOP) and its relevance in managing software complexity through decomposition techniques. It contrasts Algorithmic Decomposition with Object Oriented Decomposition, highlighting the advantages of OOP in handling complex systems by organizing them into objects that interact through defined interfaces. The text emphasizes the importance of designing software to meet functional specifications while considering performance and resource limitations.

Uploaded by

f20221335
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Object Oriented Programming

aft
(CS F213)
Object Oriented Design
Aritra Mukherjee
Dept of CSIS, BITS Pilani, Hyderabad Campus

Dr
Concept of software complexity

Algorithm vs Object Oriented Decomposition

Salient points of Object Oriented Decomposition

Object Oriented Analysis, Design and Programming

Designing Complex Systems

CS F213 a.mukherjee 2
Complex Systems

5 attributes of a complex system as per Simon, H. The Sciences of the Artificial,


MIT Press, 1982
▶ Hierarchical Form
▶ Choice of which components to view as primitive is relatively arbitrary
▶ Intracomponent linkages are stronger than intercomponent linkages
▶ Composed of a few different kinds of subsystems in various combinations and
arrangements
▶ Working ones evolved from simpler systems that worked

CS F213 a.mukherjee 3
Complex Systems
Examples
Examples of complex systems
▶ Personal Computers have several major functional elements, each of which is a
complex subsystem in itself
▶ Plants and Animals are complicated organisms. They comprise many different
organs and functional systems. These parts (usually) interact in well-defined and
complementary ways
▶ The Structure of Matter as viewed by physicists represents a complex interaction
of components. Some would argue that the organization we see in the structure of
matter provides more information about us than about matter, but only a solipsist
would argue that there is no structure to matter beyond what we impose upon it
▶ The Structure of Social Institutions, while clearly a product of human endeavor,
provide complex and systems with many interacting agents

CS F213 a.mukherjee 4
What is software complexity?

The complexity of the SW systems we are asked to develop is increasing, and on the
other hand we have limitations up on our ability to cope with the complexity.
How we resolve this?
There should be a paradigm where the complex task can be distributed in a structured
manner which is less vulnerable towards the diversity of actors solving the problem.

Consequence of complexity:
1. The more complex the system, the more open it is for breakdown.
2. Our failure to manage complexity of the software results in projects that are late,
over budget, deficiency in their state of requirements. This condition is often
called as software crisis.

CS F213 a.mukherjee 5
Divide and Rule

▶ Dijkstras suggested a technique known as “Divide and Rule”


▶ Decompose a complex system into smaller parts, each of which we may refine
independently
▶ Now we will focus on only few things at a time
Types of decomposition
1. Algorithmic Decomposition
2. Object Oriented Decomposition

CS F213 a.mukherjee 6
Algorithmic Decomposition

1. This is the classical top-down structured design approach


2. In this approach, the system is decomposed using a state-machine approach. We
decompose the large mapping from initial to final state by subdividing it into
subcomponent state mappings, then further refining these state mappings, until
we have gotten down to primitive instructions (which provide the finest granularity
of state mapping specifiable on our computer)
3. The system is hierarchically broken in submodules which have independence at the
same level.
4. The modules are divided on the basis of process only, more like breaking into
phases.
5. Process/functionality forms the basis for modularization.

CS F213 a.mukherjee 7
Object Oriented Decomposition

1. In this alternative approach, we think of the system in terms of objects


2. We consider the whole system a single object, and decompose it into its relevant
object parts. These objects have specific responsibilities with respect to the
system as a whole, respond to specific stimuli, and interact in well-defined ways
3. In this approach we view the worlds as set of autonomous objects which
collaborate to provide some high level functionality.
4. Each object is simply a tangible entity in the world, that exhibits some behavior.
5. We ask objects to do what they can do by sending them messages.
6. This decomposition is based on objects not based on the algorithm/process.

CS F213 a.mukherjee 8
Algo vs OO Decomposition

Which is a better way to decompose a complex system? Algorithmic or Object


oriented?
The answer is not straight forward at all!!!

Algorithmic Decomposition highlights the ordering of events whereas


Object-oriented view emphasizes the agents who are partaking in these events
▶ Object Oriented decomposition is more about “objectification and
compartmentalization” where entities are modelled as objects according to thier
characteristics and their mutual interactions
▶ Algorithmic decomposition is more about “sub-division and hierarchy” or breaking
the task into different temporally independent modules
▶ We can’t construct a system in both ways simultaneously
▶ We must decompose in either of the approach

CS F213 a.mukherjee 9
Algo vs OO Decomposition

▶ OO Decomposition is best suited for more complex systems with different players
▶ In OO approach, we can reuse the common mechanisms resulting in increased
reusability like algorithmic decomposition
▶ These OO systems are more resilient to change and thus better able to evolve
over time
▶ OO approach greatly reduces the risk of complex systems, since these are evolved
from already proven smaller systems in which we already have confidence

CS F213 a.mukherjee 10
Highlights
▶ The overall philosophy here is to define the software as collection of objects
(software components) of various types that interact with each other through
well-defined interfaces
▶ We can design an object to handle multiple functions and hence can participate in
several processes
▶ A software component can also store data
▶ Instead of implementing the entire process end-to-end and defining the needed
data structures along the way, we first analyze the entire set of processes and
from this identify necessary software components
▶ Each component represents a data abstraction and is designed to store
information along with procedures to manipulate the same
▶ Then the execution of the original process is broken in to several steps and each of
which is logically assigned to one of the software components(objects)
▶ The components can also communicate with each other as needed to complete
CS F213
the process a.mukherjee 11
Libsys - Algorithmic Decomposition

CS F213 a.mukherjee 12
Libsys - Object Oriented Decomposition

CS F213 a.mukherjee 13
OOA, OOD, OOP

Object-Oriented Analysis refers to a method of analysis that examines the


requirements from the perspective of classes and objects found in the vocabulary of
problem domain.
Object-Oriented Design uses object-oriented decomposition (as opposed to
algorithmic decomposition) and depicts the Logical/Physical and Static/Dynamic
models of a system. OOD encompasses the process of object oriented decomposition
and notation for depicting logical (class, interfaces, collaboration etc) , physical (
executables, tables, files etc) as well as static and dynamic models of the system
Object-Oriented Programming
▶ Object-oriented programming involves organizing programs as cooperative
collections of objects.
▶ It is of value to use and object-oriented language to write object-oriented programs

CS F213 a.mukherjee 14
Characteristics of Object Oriented Programming

Object-Oriented Programming
▶ Object-oriented programming involves organizing programs as cooperative
collections of objects.
▶ It is of value to use and object-oriented language to write object-oriented programs

▶ Has Objects, not algorithms, as its basic building blocks


▶ Each object is an instance of some class
▶ Classes are related to each other via inheritance/dependency relationship

CS F213 a.mukherjee 15
Engineering as a Science and an Art

We must make software work, yet we


must also apply an artistic aesthetic
when constructing software

CS F213 a.mukherjee 16
The Meaning of Design

What does it mean by “Designing a software?” It means to make the system in such
a way so that it satisfy
▶ Functional Specifications
▶ Limitations of the target media
▶ Performance requirements and resource limitations
▶ Constraints on form
▶ Restrictions on the design process
Next step? Model building
▶ Models appeal to the principles of decomposition, abstraction, and hierarchy
▶ Different models can be employed to describe different aspects of a system
▶ Successful system design processes involve multiple models

CS F213 a.mukherjee 17
What is okay, but how?

Examples
Elements of Software Design Methods
▶ Notation A language in which to express the models
▶ Process Activities that lead to construction of the system models
▶ Tools Specific artifacts that are employed to provide support for the creation of
models

CS F213 a.mukherjee 18
What is okay, but how?

Models of Object-Oriented Development


▶ Two Orthogonal Considerations:
▶ Static vs. Dynamic nature of a model
▶ Logical vs. Physical nature of a model
▶ When we discuss the physical nature of a model, we mean this in a metaphorical
sense. Madsen, Moeller-Pederson, and Nygaard describe this metaphor as follows:
In computerized physical models, objects are the material used for representing
physical phenomena from the application domain. Objects are thus considered as
similar to cardboard, sheets, Lego bricks, etc., in the sense that objects are
physical material that may be used for representing (or modeling) physical
phenomena. Objects are computerized material

CS F213 a.mukherjee 19
Discussion Time!

CS F213 a.mukherjee 20

You might also like