Professional Documents
Culture Documents
INTERNAL
January 21, 2009
-2-
Introduction
Owning an hammer doesnt make one an architect
Knowing a OO language like Java is a necessary but insufficient first step to create object systems!
We will try to cover many possible activities, artifacts, principles and guidelines which help
us to effectively think in objects
In all these activities a critical ability in OO Development is to skillfully assign
responsibilities to software objects.
In this first part we cover OO Analysis Its an investigation of the domain objects (doing the
right thing)
In the next part we cover OO Design where we focus on a conceptual solution that fulfills
the requirements .Its about doing the thing right
-3-
-4-
What is UML?
The Unified Modeling Language (UML) is a family of
graphical notations, that help in visualizing, specifying,
constructing and documenting software systems.
It can be used with all processes, throughout the software
development life cycle, and across different implementation
technologies
-5-
Evolution of UML
Rumbaugh - Analysis oriented (OMT*)
Booch - Design and Construction oriented
Jacobson - Use case oriented (OOSE **)
Unification:
The independent methods were evolving towards
one another.
Jim Rumbaugh, Grady Booch and Ivar Jacobson
joined Rational Software Corporation to unify their
methods.
UML 2.0 notations will be used for Object Oriented Modeling during
ILP.
-6-
Class
User
User
View
view
Behavioral View
Use
Use case
Case
Sequence
Environment View
Deployment
-7-
Model Views
User View: Illustrates how the end user views the system
Structural View: Illustrates the static feature of a model that includes
classes, attributes, behaviours and relationship between the classes.
Behavioral View: Illustrates the interactions between the objects and how
the group of objects collaborate in some behaviour
Component View: illustrate the organizations and dependencies
among software components, including source code components, run time
components, or an executable component.
Deployment View: This view shows a systems physical layer, revealing
which piece of software run on what pieces of hardware.
-8-
2. Domain Model:
A description of the domain from the perspective of objects. In this model we
identify the concepts, attributes and associations
-9-
Requirements Analysis
1. Identify the users and their goals
- 10
-
- 11
-
Case Study
get
your
hands
dirty
- 12
-
- 13
-
Customer
1.Stake Holders ?
Bank
2.Actors ?
An Actor is a role that a user plays when invoking a
use case.
A single user can represent multiple actors
Actors need not be always human, they can
represent even external systems.
- 14
-
ABC
Clerk
Bank
Customer
ABC
Clerk
Goals of Clerk
Adding a new customer
Updating existing customer details
Viewing existing customer details
Opening a current account
Handling transactions such as
withdraw, deposit and overdraft for
a current account
Closing a current account
Generate Transaction
statement
Object
Oriented Modelling
INTERNAL
Use Cases
Use case express a goal that system must achieve and/or that it must
produce
Use case has main success scenario and alternate scenarios (extensions)
/failure scenarios.
- 15
-
Title
Level
>
Scope
Stakeholders & their interests
Primary Actor
Preconditions:
Success Guarantee::
- 16
-
Within the same system, use cases relate to each other using generalization, extension or inclusion,
Use Case Relations should be sparingly used.
Instead concentrate on the textual description of use case; that's where the real value of the technique lies.
- 17
-
Domain Model
Scope,
goals,acto
rs,
features
Suggests
domain
concepts
Vision
- 18
-
Glossary
Account:
Customer: ...
Domain Model
- 19
-
- 20
-
Bank
The customer details are saved in the system
Clerk **
*Note: Details of clerk is not required in this scenario, so clerk is not considered as a
class.
**Note: System represents the whole system, its not a candidate for a class.
- 21
-
Meaning
0..1
Zero or one
One only
0..*
Zero or more
Zero or more
1..*
One or more
Six only
0..4
Zero to Four
5..15
Five to Fifteen
Domain Level Class Diagram based on analysis of UC1 (Reference Case Study)
- 22
-
Domain Level Class Diagram based on analysis of UC1 & UC4 (Reference Case Study)
- 23
-
Analysis Patterns
You may have to know the overdraft Limit for cash credit
accounts even when no cash credit account exist.
Solution- Move the overDraftLimit to another class and associate it with CashCreditAccount
Move the overdraftLimit which describes any cashCredit account to a
class called cashCreditAccountDescription.
Now you can get over draft limit of any cash credit a/c even when
no cash credit a/c is opened in the system.
The redundancy of this data is avoided
This pattern is named as Item-Descriptor Pattern.
- 24
-
1
0*
holds
holds
0*
Domain Level Class Diagram based on analysis of UC1 & UC4 (Reference Case Study)
- 25
-
References
Larman Craig, Applying UML and Patterns Third Edition, Pearson Education
Fowler Martin, UML Distilled Third Edition, Addison-Wesley
- 26
-