Escolar Documentos
Profissional Documentos
Cultura Documentos
Design
UNIT-I
Introduction to OOAD
Object oriented methods enable us to create sets
of objects that work together synergistically to
produce software that better module their problem
domains than similar systems produced by
traditional techniques. The system created using
object oriented methods are easier to adapt
changing requirements, easier to maintain, more
robust, promote greater design. The reasons why
object orientation works High level of abstraction.
Seamless transition among different phases of
software
development.
Encourage
of
good
programming techniques. Promotion of reusability.
UML diagrams
UML is composed of 9 graphical diagrams:
1) Class Diagram
2) Use Case Diagram
3) Behavior Diagram
a. Interaction Diagram
i. Sequence Diagram
ii. Collaboration Diagram
b. State Chart Diagram
c. Activity Diagram
4) Implementation Diagram
a. Component Diagram
b. Deployment Diagram
UML modeling
Unified Modeling Language
OMG Standard, Object Management
Group
Based on work from Booch, Rumbaugh,
Jacobson
Passenger
PurchaseTicket
Class Diagrams
Class diagram represents the types of objects in
the system and the various
kinds of static relationships that exist between
them. Class diagrams are used in object
modeling
where real world objects are mapped to logical
objects in computer program.
The class diagrams are used to describe the
roles and responsibilities of objects to carry out
in performing the desired behavior of the
system.
Specification
Focus on the interfaces of the software
Implementation
Focus on the implementation of the software
Interaction diagram
example
State Diagram
Interaction diagrams do not give a in depth
representation of the behavior. If you want
to see what a specific object is doing for
several use cases use a state diagram
Use state diagrams to demonstrate the
behavior of an object through many use
cases of the system.
Only use state diagrams for classes where
it is necessary to understand the behavior
of the object through the entire system
Unpaid
Paying
Invoice destroyed
Paid
ii)
[condition] /action
StateEvent(parameters)
1
do/activity 1
Start state
transition
State 2
...
End state
Action labels
Activity diagram
To see a particular behavior over many use
cases or threads use an activity diagrams
The main reason to use activity diagrams is to
model the workflow behind the system being
designed.
Activity Diagrams are also useful for: analyzing
a use case by describing what actions need to
take place and when they should occur;
describing a complicated sequential algorithm;
and modeling applications with parallel
processes.
Select course
[No]
Submit to
PA
approve?
[Yes]
Register
course
end
Enter PIN
Read card
Request PIN
[No]
Verify PIN
valid?
[Yes]
Select other
service
Package diagram
UML packages diagrams are often used to illustrate
the logical architectures of a system the layers,
subsystems, packages (in the Java sense). A layer
can be modeled as a UML package.
A UML package diagram provides a way to group
elements. A UML packages can group anything:
classes, other packages, use cases, and so on.
It is common to want to show dependency (a
coupling) between package so that developers can
see the large-scale coupling in the system. The UML
dependency line is used for this, a dashed arrowed
line with arrow pointing towards the depended-on
package.
Some UML tools can reverse-engineer package
Package diagram
Component diagram
Shows a set of components and their
relationships.
Represents the static implementation
view of a system.
Components map to one or more
classes, interfaces, or collaborations.
component diagram
example
A Deployment Diagram
A Deployment Diagram shows the configuration of run-time
processing elements and the software components, processes,
and objects.
Software
component
instances
represent
run-time
manifestations of code units.
Deployments Diagrams capture only components that exist as
run-time entities.
A deployment diagram shows the systems hardware, the
software installed on that hardware, and the middleware that
connects the disparate machines together.
A Deployment Diagram is a collection of one or more
deployment diagrams with their associated documentation.
Deployment diagrams show the physical configurations of
software and hardware.
End of unit-1