0% found this document useful (0 votes)
12 views29 pages

Object-Oriented Analysis, Design and Programming

The document discusses the complexities of software development, emphasizing the communication gaps between users and developers that can lead to a 'Software Crisis.' It introduces Object-Oriented Analysis, Design, and Programming as methods to improve understanding and communication through concepts and models, highlighting the importance of abstraction, encapsulation, modularity, and hierarchy. The benefits of the object model include enhanced expressive power, encouragement of reuse, stability, lifecycle integration, and alignment with human cognition.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views29 pages

Object-Oriented Analysis, Design and Programming

The document discusses the complexities of software development, emphasizing the communication gaps between users and developers that can lead to a 'Software Crisis.' It introduces Object-Oriented Analysis, Design, and Programming as methods to improve understanding and communication through concepts and models, highlighting the importance of abstraction, encapsulation, modularity, and hierarchy. The benefits of the object model include enhanced expressive power, encouragement of reuse, stability, lifecycle integration, and alignment with human cognition.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Object-Oriented

Analysis, Design and


Programming
Prof. Eric Amankwa
Introduction – Complex
Problems and Communication
• Software solutions are complex and require better understanding of
the underlying problem
• However, there are often communication gaps between users of
software and its developers.
• Users generally find it very hard to give precise expression to their
needs in a form that developers can understand.
• This communication gaps often lead to Software Crisis – waste of
scarce resources.
Introduction

Genesis 11:1-9 Acts 2:1-


4
The Tower Of Babel

Let's become famous by


building a city with a
tower that reaches
up to heaven (verse
four).

Let's go down and


confuse their speech
right away, and make
it so that they will
not understand each
other's speech.
(verses five through
seven).

3
Why Object-Oriented?

4
Introduction

“The "software crises" came about when people realized the major problems in
software development were … caused by communication difficulties and the
management of complexity” [Budd]

The Whorfian Hypothesis:


Human beings … are very much at the mercy of the particular language which
has become the medium of expression for their society … the 'real world' is …
built upon the language habits … We cut nature up, organize it into concepts,
and ascribe significances as we do, largely because we are parties to an
agreement to organize it in this way … and is codified in the patterns of our
language.





What kind of language can alleviate difficulties with 5


communication & complexity hopefully well?
Introduction
– Consider Human Growth & Concept Formation
• Communication & complexity about the problem and the solution, all
expressed in terms of concepts in a language!
• But then, What is CONCEPT? [Martin & Odell]
• Consider Human Growth & Concept Formation
stage concepts
infant the world is a buzzing confusion
very young age "blue" "sky“ (individual concepts)
"blue sky“ (more complex concept)
hypothesis: humans possess an innate
capacity for perception

getting older -> increased meaning, precision,


subtlety, ...
the sky is blue only on cloudless days
the sky is not really blue
it only looks blue from our planet Earth
because of atmospheric effects
elaborate conceptual constructs

Concept formation: from chaos to order!


6
concepts and objects
So, concepts are needed to bring order … into

But, What is CONCEPT?


Study of a first grade class
When given a list of concepts (water, salt water, Oceans, Penguins,...),
Harry constructed a concept diagram through which he understands his world and
communicates meaning

Does Harry understand the concepts? Do you understand what Harry understands? Agree or Diagree? 7
… for Conceptual … Modeling Reasons

What kind of language can be used to create this concept diagram,


or Harry’s mental image?

Water
Fresh water
have

Rivers Oceans have


have live in Salt water
have
Crocodiles
Fish have

Penguins

8
Why Object-Oriented ->
What is a model and why?
• A model is a simplification of reality.
E.g., a miniature bridge for a real bridge to be built

• Well...sort of….but not quite


• A model is our simplification of our perception of reality
(that is, if it exists, otherwise it could be a mere illusion).
communication is not about reality but about your/my/his/her perception of
reality => validation and verification hard but needed

• A model is an abstraction of something for the purpose of


understanding, be it the problem or a solution.
 To understand why a software system is needed, what it should do, and how it should do it.
 To communicate our understanding of why, what and how.
 To detect commonalities and differences in your perception, my perception, his perception
and her perception of reality.
 To detect misunderstandings and miscommunications.
9
What is Object-Orientation?
- What is Object?

• An "object" is anything to which a concept applies, in our awareness


• Things drawn from the problem domain or solution space.
• E.g., a living person in the problem domain, a software component in the solution space.

 A structure that has identity and properties and behavior


 It is an instance of a collective concept, i.e., a class.
10
What is an Object
Object – something that is or is capable of being seen, touched, or
otherwise sensed, and about which users store data and associate
behavior.
• Person, place, thing, or event
• Employee, customer, instructor, student
• Warehouse, office, building, room
• Product, vehicle, computer, videotape
What is Object-Oriented Analysis
(OOA)?
• Object-oriented analysis is a method of analysis that examines
requirements from the perspective of the classes and objects found in
the vocabulary of the problem domain.
What is Object-Oriented Design
(OOD)?
• Object-oriented design is a method of design encompassing the
process of object oriented decomposition and a notation for depicting
both logical and physical as well as static and dynamic models of the
system under design.
• There are two important parts to this definition: object-oriented
design (1) leads to an object-oriented decomposition and (2) uses
different notations to express different models of the logical (class
and object structure) and physical (module and process architecture)
design of a system, in addition to the static and dynamic aspects of
the system.
What is Object-Oriented
Programming (OOP)?
• Object-oriented programming is a method of implementation in
which programs are organized as cooperative collections of objects,
each of which represents an instance of some class, and whose
classes are all members of a hierarchy of classes united via
inheritance relationships.
• There are three important parts to this definition: (1) Object-oriented
programming uses objects, not algorithms, as its fundamental logical
building blocks; (2) each object is an instance of some class; and (3)
classes may be related to one another via inheritance relationships
Elements of the Object Model
• There are four major elements:
• 1. Abstraction
• 2. Encapsulation
• 3. Modularity
• 4. Hierarchy
• There are three minor elements of the object model:
• 1. Typing
• 2. Concurrency
• 3. Persistence
The Meaning of Abstraction
• Abstraction denotes the essential characteristics of an object that
distinguish it from all other kinds of objects and thus provide crisply
defined conceptual boundaries, relative to the perspective of the
viewer.
• Abstraction also focuses on the outside view of an object and so
serves to separate an object’s essential behavior from its
implementation.
Abstraction
• Helps to deal with
complexity by focusing
on certain features and
suppressing others.
• Focus on interface
(outside view)
• Separate behaviour
from implementation
The Meaning of Encapsulation
• Encapsulation is the process of compartmentalizing the elements of
an abstraction that constitute its structure and behavior;
encapsulation serves to separate the contractual interface of an
abstraction and its implementation.
Encapsulation

• Also known as information


hiding
• Hides the details of the
implementation
• Complementary to
abstraction
The Meaning of Modularity
• Modularity is the property of a system that has been
decomposed into a set of cohesive and loosely
coupled modules.
Modularity

• A common “Divide and


conquer” approach
• Partitions a problem into sub-
problems reducing complexity
• Modularity packages
abstractions into discrete units
• In java classes are the basic
modules providing
encapsulation and abstraction
The Meaning of Hierarchy
• Hierarchy is a ranking or ordering of abstractions.
• The two most important hierarchies in a complex system are its class
structure (the “is a” hierarchy) and its object structure (the “part of”
hierarchy).
Hierarchy
• A way of ordering
abstractions
• Object hierarchical
abstractions (“HAS A” or
“PART OF” relationship)
• Interfaces and
behaviours at each level
• Higher levels are more
abstract
The Meaning of Typing
• 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.
• Typing lets us express our abstractions so that the programming
language in which we implement them can be made to enforce design
decisions.
The Meaning of Concurrency
• Concurrency is the property that distinguishes an active object from
one that is not active.
• Example:
• Let’s consider a sensor named ActiveTemperatureSensor, whose
behavior requires periodically sensing the current temperature and
then notifying the client whenever the temperature changes a certain
number of degrees from a given setpoint. We do not explain how the
class implements this behavior. That fact is a secret of the
implementation, but it is clear that some form of concurrency is
required.
The Meaning of Persistence
• 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).
Benefits of the Object Model
• Enhanced Expressive Power: The object model allows developers to
fully exploit the capabilities of object-oriented languages, leading to
significant improvements in productivity and code quality through
better abstraction and use of class hierarchies.
• Encouragement of Reuse: It promotes the reuse of software and
entire designs, facilitating the creation of reusable application
frameworks. This leads to smaller, more maintainable codebases and
long-term cost and schedule benefits.
• Stability and Resilience to Change: Systems built using the object model are
more stable and resilient to changes. They can evolve over time without
needing complete redesigns, reducing the risks associated with developing
complex systems.
• Lifecycle Integration: The object model supports integration throughout the
development lifecycle rather than at a single point, promoting a more
organized separation of concerns. This approach reduces development risks
and enhances confidence in the system’s design.
• Natural Alignment with Human Cognition: Object-oriented systems align well
with natural human thinking patterns, making them easier to understand and
work with, even for those without extensive technical backgrounds.
End of today’s lecture –
Questions?

You might also like