The Final Uml
The Final Uml
OOA/OOD?? UML??
Structured Analysis
Systems development life cycle (SDLC)
Predictive approach
Uses a set of process models to describe a system graphically
Process-centered technique
Waterfall model
Structured Design
methods for analyzing and converting business r
requirements into specifications
OOD: Emphasis on defining software objects and how they collaborate to fulfill the
requirements.
For example, in the library system, a Book software object may have a title attribute
and a getChapter method . HOW??
This system holds the details of every student and tutor in the
college. In addition, the system also stores information about the
courses available at the college, and tracks which student is
following which courses.
A possible functional design would be to write the following
functions:
add_student
enter_for_exam
check_exam_marks
issue_certificate
expel_student
Book
Domain concept Visualization of
title Domain Concept
Define Design
Class Diagrams
Define Design
Class Diagrams
roll( )
fv2:= getFaceValue ( )
Bake cake
Heat oven
Mix flour/egg/sugar/milk
Place in oven
Store cake
Start cooler
Place cake in cool place
Sell cake
Get order from customer
Pack cake ordered by customer
Accept payment
Tender cash return
purchase Stock
Note items below reserve level
Calculate quantity to order
Place order
Store arrived materials
Cher
Apply the rule to the other Use Cases, and you.ll find that really, none of them
describe the goal of the user.
The goal of the user is to withdraw money, and that should be the use case!
16
ATM MACHINE
We need to build the ATM system to allow a user to withdraw money. We might
have the following series of common interactions in this scenario:
‧ enter card ‧ enter pin number ‧ select amount required
‧ confirm amount required ‧ remove card ‧ take receipt
Should each of these steps . for example, .enter pin number. be a use case?
Apply the rule to the other Use Cases, and you.ll find that really, none of them
describe the goal of the user.
The goal of the user is to withdraw money, and that should be the use case!
17
ATM MACHINE
We need to build the ATM system to allow a user to withdraw money. We might
have the following series of common interactions in this scenario:
‧ enter card ‧ enter pin number ‧ select amount required
‧ confirm amount required ‧ remove card ‧ take receipt
Should each of these steps . for example, .enter pin number. be a use case?
Apply the rule to the other Use Cases, and you.ll find that really, none of them
describe the goal of the user.
The goal of the user is to withdraw money, and that should be the use case!
18
Video Shop
Any one who wishes to rent a video from the shop must first be registered as a
member. Members may rent out videos provided that they are old enough, for this
reason the Sales Assistant needs to record each member’s date of birth when they
join. It also records each member’s address and phone number, so that they can
trace them in the event of a video not being returned.
Members can reserve a video provided a copy is available for the day they require it
and that they are genuine members. All video reservations are recorded in the
company’s video database so that the status of each copy can be monitored.
Reserved videos must be collected before 7pm.
To rent a video, members must present their Membership Card. Each video attracts
a rental charge depending on its popularity and how recently it has been released.
All Video rented out must be returned by 6pm the following day otherwise members
will be charged an extra day.
Staff need to update stock records with new titles or extra copies when deliveries
are received from Suppliers and deleting records of copies which are lost or
damaged on return.
19
Video Shop
Any one who wishes to rent a video from the shop must first be registered as a
member. Members may rent out videos provided that they are old enough, for this
reason the Sales Assistant needs to record each member’s date of birth when they
join. It also records each member’s address and phone number, so that they can
trace them in the event of a video not being returned.
Members can reserve a video provided a copy is available for the day they
require it and that they are genuine members. All video reservations are recorded in
the company’s video database so that the status of each copy can be monitored.
Reserved videos must be collected before 7pm.
To rent a video, members must present their Membership Card. Each video
attracts a rental charge depending on its popularity and how recently it has been
released. All Video rented out must be returned by 6pm the following day otherwise
members will be charged an extra day.
Staff need to update stock records with new titles or extra copies when
deliveries are received from Suppliers and deleting records of copies which are lost
or damaged on return.
20
The UML
OOA
-Use Case (Essential)
-Domain Modeling (Object Identification)
-System Sequence Diagram (Message Identification)
OOD (Elaboration)
-Use Case (Real)
-Interaction Diagram (Message Design)
-Design Class Diagram (Responsibility Assignment)
• A panacea
• A quality guarantee
During the 1990s many different methodologies their own set of notations
Method War
??Class??
OMT
Strong in analysis
Weaker in the design area.
Booch
Strong in design
Weaker in analysis.
Jacobson
Strong in behavior analysis
Weaker in the other areas.
1996 – Release of UML 1.0 by Digital Equipment, HP, ILogix, IntelliCorp, IBM,
ICON, MCI, Microsoft, Oracle, Rational, TI and Unisys.
Unification
Booch 93 OMT 2
UM 0.8 1995
Editorial revision
with out significant
UML 1.2 1998
technical changes
Structure?? Behavior??
Solution:
Create several diagrams, each focused on one view.
Each diagram provides a view into the elements that make up the system.
Activity 2
Think of sub systems that operate inside the systems discussed in Exercise 1.
…………………………………………………………………………………………
…………………………………………………………………………………………
Sequence Diagram
Collaboration Diagram
Class diagrams are static – display what interacts but not what happens when
interaction occurs.
May contain notes and constraints.
May also contain packages or subsystems, both of which are used to group
elements of your model into larger chunks
Making a decision about which abstractions are apart of the system under
consideration and which fall outside its boundaries.
Association –
Two classes are associated if one class has to know about the other. (uses)
Aggregation –
An association in which one class belongs to a collection in the other.(whole part)
Generalization –
An inheritance link indicating one class is a base class of the other.
Dependency –
A labeled dependency between classes ( such as friend, classes)
0 ..*
Person Address
fixture
+firstName 1..*
+city
+lastName
+zipcode
+ID
+country
+address
Document
-noOfPages
+open()
+save()
+print()
+new()
Page
-pageNumber
+newPage()
+hideHeader()
+hideFooter()
+insertPicture()
Trimming
-date
-time
-pageNumber
+display()
+change()
+hide()
Saroj Shakya, OOSE, Nepal College of
06/26/24 50
Information Technology
Case Study
Trimming
-date
-time
-pageNumber
+display()
+change()
+hide()
Header Footer
+newHeader() +newFooter()
Character
-ASCIICode
-type
+normal()
+italic()
+bold()
+underline()
Saroj Shakya, OOSE, Nepal College of
06/26/24 52
Information Technology
Case Study
Character
-ASCIICode
-type
+normal()
+italic()
+bold()
+underline()
Picture Table
-imageType -rows
-imageSize -columns
+insertRow()
+insert() +insertColum()
+delete() +insertTable()
+insertPicture()
Saroj Shakya, OOSE, Nepal College of
06/26/24 54
Information Technology
The UML
Object diagrams address the static design view or static process view of a
system just as do class diagrams, but from the perspective of real or
prototypical cases.
A person can own many vehicles, a vehicle must be registered , one person
must have vehicle registrations for each vehicle he owns. Every vehicle owner
must have a license to use the vehicle and the license may be valid or invalid.
A sales depot has customers and it holds stock. The stock is stocked as product
with product description, units and are ordered as sale item. Customer places
sales order that has order date , one sales order can have may sale items
client1.exe
clientA: <<TCP/IP>>
Compaq Pro
<<DECNET>>
Application DatabaseServer:
Server: Silicon VAX
<<TCP/IP>> Graphics O2
client2.exe
clientB:
Compaq Pro
The UML's five behavioral diagrams are used to visualize, specify, construct,
and document the dynamic aspects of a system.
Used to show how the system evolves over time (responds to requests , events
etc)
The UML's behavioral diagrams are roughly organized around the major
ways you can model the dynamics of a system.
- Actor – A user or another system that interacts with the modeled system.
POST
Buy Items
Log in
Refund
Purchased
Cashier items Customer
Make an
Interview
Get
<<uses>> customer
details
Make
Deposit
Make
electronic
<<extends>> Deposit
Saroj Shakya, OOSE, Nepal College of
06/26/24 69
Information Technology
What a UCD is - and what it isn’t
It is goal driven
Sequences, branching, loops, rules, etc. cannot (and should not) be directly
expressed.
User Cases are used to specify the functionality of a system from the user’s
perspective.
For example, from the point of view of the receptionist , a scenario for
booking an appointment for a patient with a doctor could be:
Ask the patient which doctor they want to see. Check the diary to see when
the next available appointments are. Agree the appointment date and time
with the patient. Enter the details on the system.
Business processes are usually associated with a major business activity and
consequently make reference to a specific business entity. A business entity
here is anything which can be used to describe the business.
Some examples of business processes are:
Pay Employee
Schedule Delivery
Receive Payment
The structure of the examples above: verb +(singular) object.
One way to find business processes is to consider the life cycle of business
entities.
for a bakery we might identify:
Order Ingredient(s)
Bake Bread
Deliver Bread
Sell Bread
Ask the patient which doctor they want to see. Check the diary to see when
the next available appointments are. Agree the appointment date and time
with the patient. Enter the details on the system.
From the point of view of the receptionist in a Clinic, a scenario for booking
an appointment for a patient with a doctor could be:
Ask the patient which doctor they want to see. Check the diary to see when
the next available appointments are. Agree the appointment date and time
with the patient. Enter the details on the system.
A customer must log in to the system but the system must authenticate
him first. After that the customer can start making booking which can be
done online as well.
A customer can review his payment history after getting authorization from
the bank. He can make payment for things he buys online , there is also a
provision of electronic payment for customers.
A system allows the clerk who enters orders from customers to manage the
customer details and also allows him to enter orders. For these purposes,
the customer record must be identified first.
A sequence diagram shows a set of objects and the messages sent and
received by those objects.
The objects are typically named or anonymous instances of classes, but may
also represent instances of other things, such as collaborations, components,
and nodes.
aStudnt:Studnt :Seminar
A sequence diagram shows a set of objects and the messages sent and
received by those objects.
The objects are typically named or anonymous instances of classes, but may
also represent instances of other things, such as collaborations, components,
and nodes.
enrollStudent(aStudnt )
isStudentEligible (aStudnt)
getSeminarHistory()
seminarHistory
eligibilityStatus
enrollmentStatus
The objects are typically named or anonymous instances of classes, but may
also represent instances of other things, such as collaborations, components,
and nodes.
Sequence and collaboration diagrams are isomorphic, meaning that you can
convert from one to the other without loss of information.
Difference?
1: Print (File)
:PrinterServer :Printer
[printer free]
1.1 Print (File)
Invoice created
unpaid
paying
Invoice destroying
paid
Shows what activities can be done in parallel, and any alternate paths through
the flow
Activity diagrams contain activities, transitions between the activities,
decision points, and synchronization bars
Assign Professor
to Course
No
All professors assigned?
Yes
Create Catalogue
Open
Registration
Saroj Shakya, OOSE, Nepal College of
06/26/24 86
Information Technology
THE ARCHITECURE
The architecture of a software-intensive system can best be described
by the 4+1 interlocking views. Each view is a projection into the organization
and structure of the system, focused on a particular aspect of that system.
Implementation View
Logical /Design View
System Assembly,
Functionality,
configuration
Vocabulary
software management
Use Case View
Understandability
usability Deployment View
Process View
System Topology,
Performance Scalability,
Delivery, Installation,
Throughput
Communication
Saroj Shakya, OOSE, Nepal College of
06/26/24 87
Information Technology
The 4+1 View: use case view
The 'plus-one' view : further describe or consolidate the other views.
encompasses the use cases that describe the behavior of the system as seen by
its end users, analysts, and testers.
This view doesn't really specify the organization of a software system. Rather, it
exists to specify the forces that shape the system's architecture.
With the UML, the static aspects of this view are captured in use case diagrams;
4. Business processes:
Student Records - Enrol Student/ Tutor Student/ Assess Student/ Process
Result(s)/ Award Qualification/ - - (sensible others can be considered here)
[Students may need help with this – next example a little easier -]
Any one who wishes to rent a video from the shop must first be registered
as a member. Members may rent out videos provided that they are old
enough, for this reason the Sales Assistant needs to record each member’s
date of birth when they join. It also records each member’s address and
phone number, so that they can trace them in the event of a video not
being returned.
Members can reserve a video provided a copy is available for the day they
require it and that they are genuine members. All video reservations are
recorded in the company’s video database so that the status of each copy
can be monitored. Reserved videos must be collected before 7pm.
To rent a video, members must present their Membership Card. Each video
attracts a rental charge depending on its popularity and how recently it has
been released. All Video rented out must be returned by 6pm the following
day otherwise members will be charged an extra day.
Staff need to update stock records with new titles or extra copies when
deliveries are received from Suppliers and deleting records of copies which
are lost or damaged on return.
With the UML, the static aspects of this view are captured in class diagrams and
object diagrams
With the UML, the static and dynamic aspects of this view are captured in the
same kinds of diagrams as for the design view, but with a focus on the active
classes that represent these threads and processes.
With the UML, the static aspects of this view are captured in component
diagrams
The deployment view of a system encompasses the nodes that form the
system's hardware topology on which the system executes.
This view primarily addresses the distribution, delivery, and installation of the
parts that make up the physical system.
With the UML, the static aspects of this view are captured in deployment
diagrams
The majority of failed projects are correlated with lack of user engagement
This is related to tackling the high-risk concerns in early iterations, since getting
the core of the architecture established is usually a risky or critical element.
The UP recommends applying use cases as the primary form for requirements
capture, and as a driving force in planning, designing, testing, and writing end-
user documentation.
configuration management.
Configuration and build management tools are used to support frequent
(ideally, at least daily) system integration and test, parallel development,
separate developer workspaces and configurations, and version control—
Philippe Kruchten, who also led the development of the RUP, served as chief
architect for the project.
Inception—specifying the project vision the seed idea for the development is
brought up to the point of being
Requirements—a narration of the system vision along with a set of functional and
nonfunctional requirements
Analysis and Design—a description of how the system will be realized in the
implementation phase