SlideShare a Scribd company logo
UML Diagrams 
by Hnin Thiri Chaw (9PhD-3) 
Free Powerpoint Templates
• UML stand for “Unified Modeling Language”. 
• There are nine kind of diagram in UML 
1. Use case diagrams 
2. Class diagrams 
3. Object diagrams 
4. Sequence diagrams 
5. Collaboration diagrams 
6. Statechart diagrams 
7. Activity diagrams 
8. Component diagrams 
9. Deployment diagrams
• The communication among everyone involved in creating and deploying the software is critical in 
complicated System. 
• The software blueprint language for analysts, designers, and programmers alike. It isnow part of 
the software trade. 
• The UML gives everyone from business analyst to designer to programmer a common 
vocabulary to talk about software design. 
• The UML is applicable to object-oriented problem solving for the construction of a model. 
• Models consist of objects. 
Class 
• Classes are the "blueprints" for objects. 
• A class wraps attributes (data) and behaviors (methods or functions) into a single distinct 
entity. Objects are instances ofclasses.
• Use case diagrams describe what a system does from the standpoint of an external observer. 
• The emphasis is on what a system does rather than how a system does. 
• Use case diagrams are closely connected to scenarios. 
• A scenario is an example of what happens when someone interacts with the system. Here is a 
scenario for a medical clinic. 
Scenario 
• "A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the 
nearest empty time slot in the appointment book and schedules the appointment for that time slot.“ 
Use Case 
• A use case is a summary of scenarios for a single task or goal. 
• An actor is who or what initiates the events involved in that task. 
• Actors are simply roles that people or objects play.
Figure: Make Appointment use case for the medical clinic. 
•The actor is a Patient. 
• The connection between actor and use case is a communication association(or communication 
for short). 
Use Case Notation 
•Actors are stick figures. 
•Use cases are ovals. 
•Communications are lines that link actors to use cases.
Figure: Make Appointment use case for the medical clinic with four actors and four use cases. 
• A use case diagram is a collection of actors, use cases, and their communications. 
• A single use case can have multiple actors. 
• Use case diagrams are helpful in three areas. 
– determining features (requirements). New use cases often generate new requirements as 
the system is analyzed and the design takes shape. 
– communicating with clients. Their notational simplicity makes use case diagrams a good 
way for developers to communicate with clients. 
– generating test cases. The collection of scenarios for a use case may suggest a suite of 
test cases for those scenarios.
Figure: A customer order from a retail catalog 
The central class is the Order. 
Associated with it are the Customer making the purchase and the Payment. A Payment is one of three kinds: 
Cash, Check, or Credit. 
The order contains OrderDetails (line items), each with its associated Item.
• A Class diagram gives an overview of a system by showing its classes and the relationships 
among them. 
• Class diagrams are static -- they display what interacts but not what happens when they do 
interact. 
UML Class Notation 
• UML class notation is a rectangle divided into three parts: class name, attributes, and 
operations. 
• Names of abstract classes, such as Payment, are in italics. 
• Relationships between classes are the connecting links. 
• A navigability arrow on an association shows which direction the association can be traversed 
or queried. 
• The arrow also lets you know who "owns" the association's implementation; in this case, 
Order Detail has an Item. 
• Associations with no navigability arrows are bi-directional.
• UML Class Notation 
• The multiplicity of an association end is the number of possible instances of the class 
associated with a single instance of the other end. 
• Multiplicities are single numbers or ranges of numbers. 
• In our example, there can be only one Customer for each Order, but a Customer can have any 
number of Orders. 
• This table gives the most common multiplicities. 
Multiplicities Meaning 
• 0..1 =>zero or one instance. 
• 0..* or * => no limit on the number of instances (including none). 
• 1 =>exactly one instance 
• 1..* => at least one instance 
• Every class diagram has classes, associations, and multiplicities. Navigability and roles are 
optional items placed in a diagram to provide clarity.
Class Relationship 
• Our class diagram has three kinds of relationships. 
• Association -- a relationship between instances of the two classes. 
• There is an association between two classes if an instance of one class must know about the 
other in order to perform its work. 
• In a diagram, an association is a link connecting two classes. 
• Aggregation -- an association in which one class belongs to a collection. 
• An aggregation has a diamond end pointing to the part containing the whole. 
• In our diagram, Order has a collection of Order Details .(‘Has’) 
• Generalization -- an inheritance link indicating one class is a superclass of the other. 
• A generalization has a triangle pointing to the superclass. 
• Payment is a superclass of Cash, Check, and Credit(‘Is’). 
• An association has two ends. 
• An end may have a role name to clarify the nature of the association. 
• For example, an OrderDetail is a line item of each Order.
• To simplify complex class diagrams, classes are grouped into packages. 
• A package is a collection of logically related UML elements. 
Package Notation 
• Packages appear as rectangles with small tabs at the top. 
• The package name is on the tab or inside the rectangle. 
• The dotted arrows are dependencies. 
• One package depends on another if changes in the other could possibly force changes in the 
first. 
Figure: Package Diagram of the Banking Business Model
Figure: Object Diagram of the Department 
of University containing many subdepartment 
Object 
•Objects that interact by sending each other messages. Think of an object as "alive.“ 
• Objects have => (1) things they know (attributes) 
=> (2)the things they can do (behaviors or operations). 
=> (3)the values of an object's attributes determine its state(attribute’s value). 
•Object diagrams show instances instead of classes. 
•They are useful for explaining small pieces with complicated relationships, 
•especially recursive relationships. 
Object Notation 
Each rectangle in the object diagram corresponds to a single instance. 
Instance names are underlined in UML diagrams. 
Class or instance names may be omitted from object diagrams as long as 
the diagram meaning is still clear.
•Class and object diagrams are static model views. 
•Interaction diagrams are dynamic. They describe how objects collaborate. 
•A sequence diagram is an interaction diagram that details how operations are carried 
out -- what messages are sent and when. Sequence diagrams are organized according to 
time. 
•The objects involved in the operation are listed from left to right according to when they take 
part in the message sequence.
Figure: Sequence Diagram of the Making Hotel Reservation 
•The object initiating the sequence of messages is a Reservation window. 
•The Reservation window sends a makeReservation() message to a HotelChain. 
•The HotelChain then sends a makeReservation() message to a Hotel. If the Hotel has 
available rooms, then it makes a Reservation and a Confirmation. 
Sequence Notation 
•Each vertical dotted line is a lifeline, representing the time that an object exists. 
• Each arrow is a message call. An arrow goes from the sender to the top of the activation bar 
of the message on the receiver's lifeline. 
•The activation bar represents the duration of execution of the message. 
•In our diagram, the Hotel issues a self call to determine if a room is available. 
•If so, then the Hotel creates a Reservation and a Confirmation. 
• The asterisk on the self call means iteration (to make sure there is available room for each day 
of the stay in the hotel). 
• The expression in square brackets, [ ], is a condition. 
•The diagram has a clarifying note, which is text inside a dog-eared rectangle. 
•Notes can be put into any kind of UML diagram.
Figure: Collaboration Diagram of the Making Hotel Reservation 
Collaboration diagrams 
• Collaboration diagrams are also interaction diagrams. 
• They convey the same information as sequence diagrams, but they focus on object roles 
instead of the times that messages are sent. 
Difference between Sequence and Collaboration Diagram 
• In a sequence diagram, object roles are the vertices and messages are the connecting links. 
The object-role rectangles are labeled with either class or object names (or both). Class 
names are preceded by colons ( : ). 
• Each message in a collaboration diagram has a sequence number. The top-level message is 
numbered 1. Messages at the same level (sent during the same call) have the same decimal 
prefix but suffixes of 1, 2, etc. according to when they occur.
• Objects have behaviors and state. 
• The state of an object depends on its current activity or condition. 
• A statechart diagram shows the possible states of the object and the transitions that cause 
a change in state. 
State Diagram Notation 
• States are rounded rectangles. 
• Transitions are arrows from one state to another. Events or conditions that trigger transitions 
are written beside the arrows. Our diagram has two self-transition, one on Getting SSN and 
another on Getting PIN. 
• The initial state (black circle) is a dummy to start the action. 
• Final states are also dummy states that terminate the action. 
• The action that occurs as a result of an event or condition is expressed in the form /action. 
• While in its Validating state, the object does not wait for an outside event to trigger a transition. 
Instead, it performs an activity. 
• The result of that activity determines its subsequent state.
Figure: State Diagram of the Login Part of Online Banking System 
• Our example diagram models the login part of an online banking system. Logging in consists 
of entering a valid social security number(SSN) and personal id number(PIN), 
thensubmitting the information for validation. 
• Logging in can be factored into four non-overlapping states: Getting SSN, Getting PIN, 
Validating, and Rejecting. From each state comes a complete set of transitions that 
determine the subsequent state.
Figure: Activity Diagram Withdrawing Money from ATM 
For our example, we used the following process. 
"Withdraw money from a bank account through an ATM." 
The three involved classes (people, etc.) of the activity are Customer, ATM, and Bank.
• An activity diagram is essentially a fancy flowchart. 
• Activity diagrams and state chart diagrams are related. 
Difference Between State Diagram and Activity Diagram 
• While a state diagram focuses attention on an object. 
• Activity diagram focuses on the flow of activities involved in a single process. 
• The activity diagram shows the how those activities depend on one another. 
Activity Diagram Notation 
• The activities are rounded rectangles. 
• The process begins at the black start circle at the top and ends at the concentric white/black 
stop circles at the bottom. 
• Activity diagrams can be divided into object swim lanes that determine which object is 
responsible for which activity. 
• A single transition comes out of each activity, connecting it to the next activity. 
• A transition may branch into two or more mutually exclusive transitions. 
• Guard expressions (inside [ ]) label the transitions coming out of a branch. 
• A branch and its subsequent merge marking the end of the branch appear in the diagram as 
hollow diamonds. 
• A transition may fork into two or more parallel activities. The fork and the subsequent join of 
the threads coming out of the fork appear in the diagram as solid bars.
Deployment Diagram 
• Deployment diagrams show the physical configurations of software andhardware. 
• The deployment diagram shows the relationships among software and hardware 
components involved in real estate transactions. 
• The physical hardware is made up of nodes. 
Component Diagram 
• A component is a code module. Component diagrams are physical analogs of class 
diagram. 
• Each component belongs on a node. 
• Components are shown as rectangles with two tabs at the upper left.
UML Diagram @ Software engineering discussion

More Related Content

What's hot (20)

PPT
08 state diagram and activity diagram
Baskarkncet
 
PPT
Introduction to Rational Rose
Munaam Munawar
 
PPT
UML Diagrams
Kartik Raghuvanshi
 
PDF
Collaboration diagram- UML diagram
Ramakant Soni
 
PPT
Uml class-diagram
ASHOK KUMAR PALAKI
 
PPTX
Uml
Vishwa Mohan
 
PDF
State chart diagram
Preeti Mishra
 
ODP
Uml
parag
 
PPTX
Communication diagram Introduction
Dineesha Suraweera
 
PPT
UML diagrams and symbols
Kumar
 
PPT
Collaboration Diagram
fahad_uaar
 
PPTX
Architectural Modeling
AMITJain879
 
PPTX
Uml structural diagrams
Swathy T
 
PDF
SE_Lec 05_System Modelling and Context Model
Amr E. Mohamed
 
PDF
Software Engineering :UML class diagrams
Ajit Nayak
 
PPT
Oomd unit1
VivekChaudhary93
 
PDF
Sequence diagram- UML diagram
Ramakant Soni
 
PPTX
Software Architecture Patterns
Assaf Gannon
 
PPTX
Activity diagram
LOKENDRA PRAJAPATI
 
PPT
Uml - An Overview
Raj Thilak S
 
08 state diagram and activity diagram
Baskarkncet
 
Introduction to Rational Rose
Munaam Munawar
 
UML Diagrams
Kartik Raghuvanshi
 
Collaboration diagram- UML diagram
Ramakant Soni
 
Uml class-diagram
ASHOK KUMAR PALAKI
 
State chart diagram
Preeti Mishra
 
Uml
parag
 
Communication diagram Introduction
Dineesha Suraweera
 
UML diagrams and symbols
Kumar
 
Collaboration Diagram
fahad_uaar
 
Architectural Modeling
AMITJain879
 
Uml structural diagrams
Swathy T
 
SE_Lec 05_System Modelling and Context Model
Amr E. Mohamed
 
Software Engineering :UML class diagrams
Ajit Nayak
 
Oomd unit1
VivekChaudhary93
 
Sequence diagram- UML diagram
Ramakant Soni
 
Software Architecture Patterns
Assaf Gannon
 
Activity diagram
LOKENDRA PRAJAPATI
 
Uml - An Overview
Raj Thilak S
 

Viewers also liked (20)

PPTX
Online Banking Project
M.Saber
 
DOCX
Sequence Diagram of Hotel Management System
Sushil Mishra
 
PDF
INTRODUCTION TO UML DIAGRAMS
Ashita Agrawal
 
PPTX
Component and Deployment Diagram - Brief Overview
Rajiv Kumar
 
DOCX
Uml diagram for_hospital_management_system
Pradeep Bhosale
 
DOC
SYNOPSIS ON BANK MANAGEMENT SYSTEM
Nitish Xavier Tirkey
 
PPT
java Project report online banking system
VishNu KuNtal
 
PPT
UML
iQra Rafaqat
 
PPT
UML Use Case & Class Diagrams (College 2003)
Irene Tosch
 
PPTX
Case studies use cases ASE
babak danyal
 
PPSX
Uml tutorial (1) (1)
IIUM
 
PPT
Intro to UML - Use Case diagrams
jsm1979
 
PPTX
Uml diagrams
Muhammad Yousuf Abdul Qadir
 
PPTX
Activity diagram tutorial part 2
Declan Chellar
 
PDF
Hotel Management System
Adil Ayyaz
 
PDF
2 class use case
Minal Maniar
 
PPT
Uml sequence diagrams
ASHOK KUMAR PALAKI
 
PDF
Use Case diagram-UML diagram-2
Ramakant Soni
 
PPT
Sequence diagrams
Vince Carter
 
Online Banking Project
M.Saber
 
Sequence Diagram of Hotel Management System
Sushil Mishra
 
INTRODUCTION TO UML DIAGRAMS
Ashita Agrawal
 
Component and Deployment Diagram - Brief Overview
Rajiv Kumar
 
Uml diagram for_hospital_management_system
Pradeep Bhosale
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
Nitish Xavier Tirkey
 
java Project report online banking system
VishNu KuNtal
 
UML Use Case & Class Diagrams (College 2003)
Irene Tosch
 
Case studies use cases ASE
babak danyal
 
Uml tutorial (1) (1)
IIUM
 
Intro to UML - Use Case diagrams
jsm1979
 
Activity diagram tutorial part 2
Declan Chellar
 
Hotel Management System
Adil Ayyaz
 
2 class use case
Minal Maniar
 
Uml sequence diagrams
ASHOK KUMAR PALAKI
 
Use Case diagram-UML diagram-2
Ramakant Soni
 
Sequence diagrams
Vince Carter
 
Ad

Similar to UML Diagram @ Software engineering discussion (20)

PPT
umlpresentation-140519151641-phpapp02.ppt
FootballToday3
 
PPTX
UML diagram is a process that Provide a great Knowledge
AssadLeo1
 
PPT
Uml lecture
Inocentshuja Ahmad
 
PPT
Fundamentals of Software Engineering
Madhar Khan Pathan
 
PPTX
An introduction to uml
Tony Huynh
 
PPT
UML Introduction The system development life cycle (SDLC) is a complex projec...
ssuserdb9909
 
PPTX
UML Chart Designing Methods - Lecture.pptx
lankanking4
 
PDF
UML Overview and Introduction functions.pdf
prathipaceec
 
DOCX
Case tool lab-Reg2013 by Karthick Raja
ursKarthick Raja
 
PPT
Intro Uml
Kris der Rose
 
PDF
Types of UML diagrams
Mukesh Tekwani
 
PPTX
Unified Modeling Language and Examples .pptx
abinaya707644
 
PPT
Uml report
Franco Valdez
 
PDF
Design UML diagrams
Neeraj Kaushik
 
PDF
Design UML diagrams
Neeraj Kaushik
 
PPT
Unified Modeling Language
Debajyoti Biswas
 
PPT
UML- Unified Modeling Language
Shahzad
 
PPTX
FSD MICRO PROJECT UML PPT.pptx
ThorOdinson55
 
PPTX
Chapter3
Fahad Sheref
 
PDF
Object-Oriented Analysis and Design report
ritikapoudel2017
 
umlpresentation-140519151641-phpapp02.ppt
FootballToday3
 
UML diagram is a process that Provide a great Knowledge
AssadLeo1
 
Uml lecture
Inocentshuja Ahmad
 
Fundamentals of Software Engineering
Madhar Khan Pathan
 
An introduction to uml
Tony Huynh
 
UML Introduction The system development life cycle (SDLC) is a complex projec...
ssuserdb9909
 
UML Chart Designing Methods - Lecture.pptx
lankanking4
 
UML Overview and Introduction functions.pdf
prathipaceec
 
Case tool lab-Reg2013 by Karthick Raja
ursKarthick Raja
 
Intro Uml
Kris der Rose
 
Types of UML diagrams
Mukesh Tekwani
 
Unified Modeling Language and Examples .pptx
abinaya707644
 
Uml report
Franco Valdez
 
Design UML diagrams
Neeraj Kaushik
 
Design UML diagrams
Neeraj Kaushik
 
Unified Modeling Language
Debajyoti Biswas
 
UML- Unified Modeling Language
Shahzad
 
FSD MICRO PROJECT UML PPT.pptx
ThorOdinson55
 
Chapter3
Fahad Sheref
 
Object-Oriented Analysis and Design report
ritikapoudel2017
 
Ad

More from CherryBerry2 (13)

PPTX
Super Pilot Team Mini project
CherryBerry2
 
PPTX
General Aung San
CherryBerry2
 
PDF
Histogram Equalization(Image Processing Presentation)
CherryBerry2
 
PPTX
Probability Concept and Bayes Theorem
CherryBerry2
 
PPTX
Type of data @ Web Mining Discussion
CherryBerry2
 
PPTX
Type of data @ web mining discussion
CherryBerry2
 
PDF
Concurrent Programming OpenMP @ Distributed System Discussion
CherryBerry2
 
PPTX
Strategic management presentation (group 3) (final)
CherryBerry2
 
PPTX
Strategic management presentation (group 3) (final)
CherryBerry2
 
PPTX
Thanlyan Star City (MBA internship programme)
CherryBerry2
 
PPTX
V kids Business Plan (15 batch Group 3)
CherryBerry2
 
PPSX
Hurricane
CherryBerry2
 
PPTX
Myanmar pharmaceutical market and marketing mix activities of trading company
CherryBerry2
 
Super Pilot Team Mini project
CherryBerry2
 
General Aung San
CherryBerry2
 
Histogram Equalization(Image Processing Presentation)
CherryBerry2
 
Probability Concept and Bayes Theorem
CherryBerry2
 
Type of data @ Web Mining Discussion
CherryBerry2
 
Type of data @ web mining discussion
CherryBerry2
 
Concurrent Programming OpenMP @ Distributed System Discussion
CherryBerry2
 
Strategic management presentation (group 3) (final)
CherryBerry2
 
Strategic management presentation (group 3) (final)
CherryBerry2
 
Thanlyan Star City (MBA internship programme)
CherryBerry2
 
V kids Business Plan (15 batch Group 3)
CherryBerry2
 
Hurricane
CherryBerry2
 
Myanmar pharmaceutical market and marketing mix activities of trading company
CherryBerry2
 

Recently uploaded (20)

PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 

UML Diagram @ Software engineering discussion

  • 1. UML Diagrams by Hnin Thiri Chaw (9PhD-3) Free Powerpoint Templates
  • 2. • UML stand for “Unified Modeling Language”. • There are nine kind of diagram in UML 1. Use case diagrams 2. Class diagrams 3. Object diagrams 4. Sequence diagrams 5. Collaboration diagrams 6. Statechart diagrams 7. Activity diagrams 8. Component diagrams 9. Deployment diagrams
  • 3. • The communication among everyone involved in creating and deploying the software is critical in complicated System. • The software blueprint language for analysts, designers, and programmers alike. It isnow part of the software trade. • The UML gives everyone from business analyst to designer to programmer a common vocabulary to talk about software design. • The UML is applicable to object-oriented problem solving for the construction of a model. • Models consist of objects. Class • Classes are the "blueprints" for objects. • A class wraps attributes (data) and behaviors (methods or functions) into a single distinct entity. Objects are instances ofclasses.
  • 4. • Use case diagrams describe what a system does from the standpoint of an external observer. • The emphasis is on what a system does rather than how a system does. • Use case diagrams are closely connected to scenarios. • A scenario is an example of what happens when someone interacts with the system. Here is a scenario for a medical clinic. Scenario • "A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the nearest empty time slot in the appointment book and schedules the appointment for that time slot.“ Use Case • A use case is a summary of scenarios for a single task or goal. • An actor is who or what initiates the events involved in that task. • Actors are simply roles that people or objects play.
  • 5. Figure: Make Appointment use case for the medical clinic. •The actor is a Patient. • The connection between actor and use case is a communication association(or communication for short). Use Case Notation •Actors are stick figures. •Use cases are ovals. •Communications are lines that link actors to use cases.
  • 6. Figure: Make Appointment use case for the medical clinic with four actors and four use cases. • A use case diagram is a collection of actors, use cases, and their communications. • A single use case can have multiple actors. • Use case diagrams are helpful in three areas. – determining features (requirements). New use cases often generate new requirements as the system is analyzed and the design takes shape. – communicating with clients. Their notational simplicity makes use case diagrams a good way for developers to communicate with clients. – generating test cases. The collection of scenarios for a use case may suggest a suite of test cases for those scenarios.
  • 7. Figure: A customer order from a retail catalog The central class is the Order. Associated with it are the Customer making the purchase and the Payment. A Payment is one of three kinds: Cash, Check, or Credit. The order contains OrderDetails (line items), each with its associated Item.
  • 8. • A Class diagram gives an overview of a system by showing its classes and the relationships among them. • Class diagrams are static -- they display what interacts but not what happens when they do interact. UML Class Notation • UML class notation is a rectangle divided into three parts: class name, attributes, and operations. • Names of abstract classes, such as Payment, are in italics. • Relationships between classes are the connecting links. • A navigability arrow on an association shows which direction the association can be traversed or queried. • The arrow also lets you know who "owns" the association's implementation; in this case, Order Detail has an Item. • Associations with no navigability arrows are bi-directional.
  • 9. • UML Class Notation • The multiplicity of an association end is the number of possible instances of the class associated with a single instance of the other end. • Multiplicities are single numbers or ranges of numbers. • In our example, there can be only one Customer for each Order, but a Customer can have any number of Orders. • This table gives the most common multiplicities. Multiplicities Meaning • 0..1 =>zero or one instance. • 0..* or * => no limit on the number of instances (including none). • 1 =>exactly one instance • 1..* => at least one instance • Every class diagram has classes, associations, and multiplicities. Navigability and roles are optional items placed in a diagram to provide clarity.
  • 10. Class Relationship • Our class diagram has three kinds of relationships. • Association -- a relationship between instances of the two classes. • There is an association between two classes if an instance of one class must know about the other in order to perform its work. • In a diagram, an association is a link connecting two classes. • Aggregation -- an association in which one class belongs to a collection. • An aggregation has a diamond end pointing to the part containing the whole. • In our diagram, Order has a collection of Order Details .(‘Has’) • Generalization -- an inheritance link indicating one class is a superclass of the other. • A generalization has a triangle pointing to the superclass. • Payment is a superclass of Cash, Check, and Credit(‘Is’). • An association has two ends. • An end may have a role name to clarify the nature of the association. • For example, an OrderDetail is a line item of each Order.
  • 11. • To simplify complex class diagrams, classes are grouped into packages. • A package is a collection of logically related UML elements. Package Notation • Packages appear as rectangles with small tabs at the top. • The package name is on the tab or inside the rectangle. • The dotted arrows are dependencies. • One package depends on another if changes in the other could possibly force changes in the first. Figure: Package Diagram of the Banking Business Model
  • 12. Figure: Object Diagram of the Department of University containing many subdepartment Object •Objects that interact by sending each other messages. Think of an object as "alive.“ • Objects have => (1) things they know (attributes) => (2)the things they can do (behaviors or operations). => (3)the values of an object's attributes determine its state(attribute’s value). •Object diagrams show instances instead of classes. •They are useful for explaining small pieces with complicated relationships, •especially recursive relationships. Object Notation Each rectangle in the object diagram corresponds to a single instance. Instance names are underlined in UML diagrams. Class or instance names may be omitted from object diagrams as long as the diagram meaning is still clear.
  • 13. •Class and object diagrams are static model views. •Interaction diagrams are dynamic. They describe how objects collaborate. •A sequence diagram is an interaction diagram that details how operations are carried out -- what messages are sent and when. Sequence diagrams are organized according to time. •The objects involved in the operation are listed from left to right according to when they take part in the message sequence.
  • 14. Figure: Sequence Diagram of the Making Hotel Reservation •The object initiating the sequence of messages is a Reservation window. •The Reservation window sends a makeReservation() message to a HotelChain. •The HotelChain then sends a makeReservation() message to a Hotel. If the Hotel has available rooms, then it makes a Reservation and a Confirmation. Sequence Notation •Each vertical dotted line is a lifeline, representing the time that an object exists. • Each arrow is a message call. An arrow goes from the sender to the top of the activation bar of the message on the receiver's lifeline. •The activation bar represents the duration of execution of the message. •In our diagram, the Hotel issues a self call to determine if a room is available. •If so, then the Hotel creates a Reservation and a Confirmation. • The asterisk on the self call means iteration (to make sure there is available room for each day of the stay in the hotel). • The expression in square brackets, [ ], is a condition. •The diagram has a clarifying note, which is text inside a dog-eared rectangle. •Notes can be put into any kind of UML diagram.
  • 15. Figure: Collaboration Diagram of the Making Hotel Reservation Collaboration diagrams • Collaboration diagrams are also interaction diagrams. • They convey the same information as sequence diagrams, but they focus on object roles instead of the times that messages are sent. Difference between Sequence and Collaboration Diagram • In a sequence diagram, object roles are the vertices and messages are the connecting links. The object-role rectangles are labeled with either class or object names (or both). Class names are preceded by colons ( : ). • Each message in a collaboration diagram has a sequence number. The top-level message is numbered 1. Messages at the same level (sent during the same call) have the same decimal prefix but suffixes of 1, 2, etc. according to when they occur.
  • 16. • Objects have behaviors and state. • The state of an object depends on its current activity or condition. • A statechart diagram shows the possible states of the object and the transitions that cause a change in state. State Diagram Notation • States are rounded rectangles. • Transitions are arrows from one state to another. Events or conditions that trigger transitions are written beside the arrows. Our diagram has two self-transition, one on Getting SSN and another on Getting PIN. • The initial state (black circle) is a dummy to start the action. • Final states are also dummy states that terminate the action. • The action that occurs as a result of an event or condition is expressed in the form /action. • While in its Validating state, the object does not wait for an outside event to trigger a transition. Instead, it performs an activity. • The result of that activity determines its subsequent state.
  • 17. Figure: State Diagram of the Login Part of Online Banking System • Our example diagram models the login part of an online banking system. Logging in consists of entering a valid social security number(SSN) and personal id number(PIN), thensubmitting the information for validation. • Logging in can be factored into four non-overlapping states: Getting SSN, Getting PIN, Validating, and Rejecting. From each state comes a complete set of transitions that determine the subsequent state.
  • 18. Figure: Activity Diagram Withdrawing Money from ATM For our example, we used the following process. "Withdraw money from a bank account through an ATM." The three involved classes (people, etc.) of the activity are Customer, ATM, and Bank.
  • 19. • An activity diagram is essentially a fancy flowchart. • Activity diagrams and state chart diagrams are related. Difference Between State Diagram and Activity Diagram • While a state diagram focuses attention on an object. • Activity diagram focuses on the flow of activities involved in a single process. • The activity diagram shows the how those activities depend on one another. Activity Diagram Notation • The activities are rounded rectangles. • The process begins at the black start circle at the top and ends at the concentric white/black stop circles at the bottom. • Activity diagrams can be divided into object swim lanes that determine which object is responsible for which activity. • A single transition comes out of each activity, connecting it to the next activity. • A transition may branch into two or more mutually exclusive transitions. • Guard expressions (inside [ ]) label the transitions coming out of a branch. • A branch and its subsequent merge marking the end of the branch appear in the diagram as hollow diamonds. • A transition may fork into two or more parallel activities. The fork and the subsequent join of the threads coming out of the fork appear in the diagram as solid bars.
  • 20. Deployment Diagram • Deployment diagrams show the physical configurations of software andhardware. • The deployment diagram shows the relationships among software and hardware components involved in real estate transactions. • The physical hardware is made up of nodes. Component Diagram • A component is a code module. Component diagrams are physical analogs of class diagram. • Each component belongs on a node. • Components are shown as rectangles with two tabs at the upper left.