SlideShare a Scribd company logo
1 of 67
Download to read offline
UML Training
by
Somenath Mukhopadhyay
+91 9748185282
som@som-itsolutions.com / som.mukhopadhyay@gmail.com
Part I – Use Case
Part II – Class Diagram
Part III – Sequence Diagram
Use Case Analysis
What is a Use Case
● A formal way of representing how a business system
interacts with its environment
● Illustrates the activities that are performed by the users of
the system
● A scenario-based technique in the UML
●
A sequence of actions a system performs that yields a
valuable result for a particular actor.
What is an Actor?
● A user or outside system that interacts with the system
being designed in order to obtain some value from
that interaction
● Use Cases describe scenarios that describe the interaction
between users of the system (the actor) and the system
itself.
● 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.
● Use case diagrams are closely connected to scenarios.
A scenario is an example of what happens when
someone interacts with the system.
Step 1 - Identify the actors
As we read the scenario, define those people or systems
that are going to interact with the scenario.
A customer enters a restaurant and requests for a table. The receptionist finds an empty table and
asks the customer to occupy it.
Questions for identifying People
Actors
● Ask client and domain experts how system will be
used
● Who will perform the obvious tasks?
Secondary tasks of maintenance and
administration? Interact with other systems?
Questions for identifying other
Actors
● What other entity is interested in the
scenario/system?
● What other entity will supply the scenario/system
with this information, use this information, and
remove this information?
● Does the system use an external resource?
Actors
An Actor is outside or external the system.
It can be a:
● Human
● Peripheral device (hardware)
● External system or subsystem
● Represented by stick figure
Step 2 – Recording the use case
For each actor, what interactions they require of the system – each
is a use case
● What tasks does the actor want the system to perform
● What information must the actor provide to the system
● Are there events that the actor must tell system about
● Does actor need to be informed when something happens
● Does actor help initialize or shut down the system
Case Study – Restaurant System
Actor : Customer
● What tasks does the actor want the system to perform?
- Find an empty table to occupy, display the menu card, take the order & accept the payment
● What information must the actor provide to the system?
- How many guests are there with him, choice of his menu and how many plates for each of
them
● Are there events that the actor must tell system about?
- Whether he wants to pay through credit card/check/cash
● Does actor need to be informed when something happens?
- If any menu chosen by the customer is not available he has to be informed
● Does actor help initialize or shut down the system
- no
Resulting Use Cases –
Actor : Customer
Customer enters the Restaurant and asks the receptionist for an
empty table
Customer looks at the menu & places an order
Customer is notified when any item of the menu is not available
Customer complets the food, leaves the table and pays the bill
Note: simple phrases, without much details initially.
Other Actors
● The receptionist opens the chart of the empty table
and suggests one to the customer
● The waiter takes order from the customer, notifies
him if anything is not available and serves him the
food
● The cashier calculates the bill and gives it to the
customer
● An external system (say a tablet) may be used as
an Actor for displaying & ordering the menu
Use Cases – Restaurant System
Use Case Name Request A Table
Actor Customer
Description
Describes the process when a
customer steps inside a restaurant and
asks the Receptionist/May I Help You
for a Table
Normal Flow
Customer enters the Restaurant and
asks for a table
Exceptional Flow None
Use Case Name ProduceTheTableChart
Actor Receptionist/May I Help You
Description
Describes the process when the
receptionist opens the chart to see
which table is empty
Normal Flow
1. Receptionist opens the chart and
finds out which table is empty
2. She asks the customer to occupy
the vacant table
Exceptional Flow
If all the tables are occupied, the
receptionist puts the customer in a
queue
Use Case Name Manage Menu & Order
Actor External System (Say a Tablet)
Description
It displays the menu items and their
prices
Normal Flow
1. Displays the menu items and their
prices
2. Lets one to choose and pick from
the list and how many plates for each
item
Exceptional Flow
When a menu item is not available, it
lets others know about that
Use Case Name Place An Order
Actor Customer
Description
Describes the process when a
customer looks at the menu table and
orders for some items
Normal Flow
1. Customer looks at the menu table
2. Customer chooses some from the
table and decides how many plates for
each menu item
3. Customer places the order
Exceptional Flow None
Use Case Name Collects The Order
Actor Waiter
Description
Describes the process when a waiter
collects an order from a customer and
serves foods to the later
Normal Flow
1. Waiter collects the order from the
customer
2. Waiter delivers the food
Exceptional Flow
When any menu item is not available
the waiter lets the customer know
abotu it
Use Case Name Collect Money
Actor Cashier
Description
Describes the process when a
customer wants to pay the bill
Normal Flow
1. Cashier opens the Billing System
and find out how much is due for the
current customer
2. Cashier asks the customer what
kind of payment method the later
wants to use : Cash/Credit Card/Check
3. If the customer wants to pay using
credit card, the cashier processes it
using a machine
4. The cashier collects the money
Exceptional Flow
When the customer does not have any
credit balance in his credit card
Use Case Name Update Account Info
Actor Cashier
Description
Describes the process when the
cashier updates the Account Info in the
main System after the customer pays
the bill
Normal Flow The cashier updates the Account Info
in the System
Exceptional Flow None
Use Case Name Produce Billing System Info
Actor External System ( May be a Tablet)
Description
Describes the process when the Actor
interacts with the Server/Legacy
System to show the amount due for
the current customer
Normal Flow
Starts interacting with the backend
system and shows the Amount due for
the current customer
Exceptional Flow The Backend system is down
Use Case Name Pay Bill
Actor Customer
Description
Describes the process when the
customer wants to pay the bill
Normal Flow The customer proceeds to the cash
counter and pays the bill
Exceptional Flow None
Use Case Name Pay Bill By Cash
Actor Customer
Description
Describes the process when the
customer wants to pay the bill in Cash
Normal Flow The customer proceeds to the cash
counter and pays the bill in Cash
Exceptional Flow
The customer does not have the
required amount of cash at that
moment
Use Case Name Pay Bill By Cheque
Actor Customer
Description
Describes the process when the
customer wants to pay the bill through
Check
Normal Flow
The customer proceeds to the cash
counter and pays the bill through check
Exceptional Flow None
Use Case Name Pay Bill By Credit Card
Actor Customer
Description
Describes the process when the
customer wants to pay the bill through
Credit Card
Normal Flow
The customer proceeds to the cash
counter and pays the bill through
Credit Card
Exceptional Flow
The customer does not have the
required credit amount in his credit
card account
Relationships between Use Cases
● Include
● Extend
Include Relationship
● Represents the inclusion of the functionality of one use
case within another
● Arrow is drawn from the base use case to the used
use case
● Write << include >> above arrowhead line
Restaurant System – Use Case Diagram
Class Diagrams
What is a Class Diagram
● A Class Diagram is a diagram describing the
static structure of a system
● It shows the system's
● classes
● attributes
● operations (or methods),
● Relationships among the classes.
Essential elements of a UML Class
Diagram
● Class
● Attributes
● Operations
● Relationships
➔ Dependency
➔ Aggregation
➔ Composition
➔ Inheritance
➔ Realization
● Constraint Rules and Notes
Class
● A class in UML Class Diagram has
➔ Attributes ( state)
➔ Operations (behavior)
● It has static relationship with the other classes of the system
● Each Atrribute & Operation has different visibilities
➔ “+” for public
➔ “-” for private
➔ “#” for protected
Relationship between classes
The relationships are called as
● Dependency : class A uses class B
● Aggregation : class A has a class B
● Composition : class A owns a class B
● Inheritance : class B is a Class A (or class A is
extended by class B)
● Realization : class B realizes Class A (or interface
A is realized by class B)
Dependency
Dependency is represented when a reference to one class is passed in as a method
parameter to another class or a local variable of another class is created in a member
function. For example, an instance of class B is passed in to a method of class A:
● public class A {
public void doSomething(B b) {
.......
}
● public class A{
public void doSomething(){
B b = new B();
.........
}
Aggregation
If class A stored the reference to class B for later use we
would have a different relationship called Aggregation. A
common and obvious example of Aggregation would be
via setter injection:
● public class A {
private B _b;
public void setB(B b) { _b = b; }
Composition
● Aggregation is the weaker form of object
containment (one object contains other
objects). The stronger form is called
Composition. In Composition the containing
object is responsible for the creation and life
cycle of the contained object (either directly or
indirectly)
● In the next three slides you will see the
example of composition
Composition – via member
initialization
● public class A {
private B _b = new B();
Composition - via constructor
initialization
● public class A {
private B _b;
public A() {
_b = new B();
} // default constructor
Composition – via lazy initialization
public class A {
private B _b;
public void doSomethingUniqueToB() {
if (null == _b) {
_b = new B();
}
return _b.doSomething();
} // doSomethingUniqueToB()
Inheritance
public class A {
...
} // class A
public class B extends A {
....
} // class B
Realization
public interface A {
...
} // interface A
public class B implements A {
...
} // class B
Case Study – Restaurant System
Find out the nouns from the Use Case Analysis.
These are likely to be major classes.
First the classes for the major Actors
● Customer
● Receptionist
● Waiter
● Cashier
Case Study – Restaurant System
Refactoring – Introducing Employee
Class
Sequence Diagram
● UML Specifies a number of interaction
diagrams to model dynamic aspects of the
system
● Dynamic aspects of the system
– Messages moving among objects of classes
– Flow of control among objects
– Sequences of events
Dynamic Diagram
The most important dynamic diagrams are -
● Interaction Diagrams - Set of objects or roles and
the messages that can be passed among them
– Sequence Diagrams - emphasize time ordering
– Communication Diagrams - emphasize structural
ordering
● State Diagrams - State machine consisting of
states, transitions, events and activities of an object
Sequence Diagram
● Describe the flow of messages, events, actions
between objects
● Show concurrent processes and activations
● Show time sequences that are not easily
depicted in other diagrams
● Typically used during analysis and design to
document and understand the logical flow of
your system
Participating Objects
● Squares with object type, optionally preceded
by object name and colon
● Object's "life line" represented by dashed
vertical line
● Message (method call) indicated by horizontal
arrow to other object
Messages
● Messages are (method call) indicated by
horizontal arrow to other object
● Dashed arrow back indicates return (optional)
● Different arrowheads for normal / concurrent
(asynchronous) methods
Lifetime of Objects
● Creation: arrow with 'new/create' written above
it
– notice that an object created after the start of
the scenario appears lower than the others
● Deletion: an X at bottom of object's lifeline
– Java doesn't explicitly delete objects; they fall
out of scope and are garbage-collected
Uml training
Uml training

More Related Content

Similar to Uml training

Actors in Requirements Elicitation.pdf
Actors in Requirements Elicitation.pdfActors in Requirements Elicitation.pdf
Actors in Requirements Elicitation.pdfNehagupta259541
 
Systems diagrams &amp; visualization (uml &amp; data flow)exampl
Systems diagrams &amp; visualization (uml &amp; data flow)examplSystems diagrams &amp; visualization (uml &amp; data flow)exampl
Systems diagrams &amp; visualization (uml &amp; data flow)examplcherry686017
 
Design Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docxDesign Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docxtheodorelove43763
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case DiagramKumar
 
conversion-gate02.pptx
conversion-gate02.pptxconversion-gate02.pptx
conversion-gate02.pptxNouraBaccar1
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesSE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesAmr E. Mohamed
 
Splunk | Use Case Training
Splunk | Use Case TrainingSplunk | Use Case Training
Splunk | Use Case TrainingBeth Goldman
 
SE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use CasesSE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use CasesAmr E. Mohamed
 
Use Case Model with components in software.ppt
Use Case Model with components in software.pptUse Case Model with components in software.ppt
Use Case Model with components in software.pptTalhaTajammal1
 
Use Case Diagram.pptx
Use Case Diagram.pptxUse Case Diagram.pptx
Use Case Diagram.pptxGenta Sahuri
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modelingShahid Riaz
 
usecase (1).pptx
usecase (1).pptxusecase (1).pptx
usecase (1).pptxNadir438180
 
Unit 3(advanced state modeling & interaction meodelling)
Unit  3(advanced state modeling & interaction meodelling)Unit  3(advanced state modeling & interaction meodelling)
Unit 3(advanced state modeling & interaction meodelling)Manoj Reddy
 

Similar to Uml training (20)

Actors in Requirements Elicitation.pdf
Actors in Requirements Elicitation.pdfActors in Requirements Elicitation.pdf
Actors in Requirements Elicitation.pdf
 
Use case Diagram
Use case DiagramUse case Diagram
Use case Diagram
 
Systems diagrams &amp; visualization (uml &amp; data flow)exampl
Systems diagrams &amp; visualization (uml &amp; data flow)examplSystems diagrams &amp; visualization (uml &amp; data flow)exampl
Systems diagrams &amp; visualization (uml &amp; data flow)exampl
 
Defining The System
Defining The SystemDefining The System
Defining The System
 
Design Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docxDesign Implementation ProposalDesign Implementation Proposal.docx
Design Implementation ProposalDesign Implementation Proposal.docx
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
conversion-gate02.pptx
conversion-gate02.pptxconversion-gate02.pptx
conversion-gate02.pptx
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesSE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
 
Splunk | Use Case Training
Splunk | Use Case TrainingSplunk | Use Case Training
Splunk | Use Case Training
 
Use Case UML Diagram
Use Case UML DiagramUse Case UML Diagram
Use Case UML Diagram
 
Use case modeling
Use case modelingUse case modeling
Use case modeling
 
chapter_5_5.ppt
chapter_5_5.pptchapter_5_5.ppt
chapter_5_5.ppt
 
SE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use CasesSE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use Cases
 
Use Case Model with components in software.ppt
Use Case Model with components in software.pptUse Case Model with components in software.ppt
Use Case Model with components in software.ppt
 
Use Case Diagram.pptx
Use Case Diagram.pptxUse Case Diagram.pptx
Use Case Diagram.pptx
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modeling
 
usecase (1).pptx
usecase (1).pptxusecase (1).pptx
usecase (1).pptx
 
Unit 3(advanced state modeling & interaction meodelling)
Unit  3(advanced state modeling & interaction meodelling)Unit  3(advanced state modeling & interaction meodelling)
Unit 3(advanced state modeling & interaction meodelling)
 
Use case model
Use case modelUse case model
Use case model
 
Session07-Diagram.pdf
Session07-Diagram.pdfSession07-Diagram.pdf
Session07-Diagram.pdf
 

More from Somenath Mukhopadhyay

Significance of private inheritance in C++...
Significance of private inheritance in C++...Significance of private inheritance in C++...
Significance of private inheritance in C++...Somenath Mukhopadhyay
 
Arranging the words of a text lexicographically trie
Arranging the words of a text lexicographically   trieArranging the words of a text lexicographically   trie
Arranging the words of a text lexicographically trieSomenath Mukhopadhyay
 
Generic asynchronous HTTP utility for android
Generic asynchronous HTTP utility for androidGeneric asynchronous HTTP utility for android
Generic asynchronous HTTP utility for androidSomenath Mukhopadhyay
 
Java concurrency model - The Future Task
Java concurrency model - The Future TaskJava concurrency model - The Future Task
Java concurrency model - The Future TaskSomenath Mukhopadhyay
 
Memory layout in C++ vis a-vis polymorphism and padding bits
Memory layout in C++ vis a-vis polymorphism and padding bitsMemory layout in C++ vis a-vis polymorphism and padding bits
Memory layout in C++ vis a-vis polymorphism and padding bitsSomenath Mukhopadhyay
 
Developing an Android REST client to determine POI using asynctask and integr...
Developing an Android REST client to determine POI using asynctask and integr...Developing an Android REST client to determine POI using asynctask and integr...
Developing an Android REST client to determine POI using asynctask and integr...Somenath Mukhopadhyay
 
How to create your own background for google docs
How to create your own background for google docsHow to create your own background for google docs
How to create your own background for google docsSomenath Mukhopadhyay
 
The Designing of a Software System from scratch with the help of OOAD & UML -...
The Designing of a Software System from scratch with the help of OOAD & UML -...The Designing of a Software System from scratch with the help of OOAD & UML -...
The Designing of a Software System from scratch with the help of OOAD & UML -...Somenath Mukhopadhyay
 
Structural Relationship between Content Resolver and Content Provider of Andr...
Structural Relationship between Content Resolver and Content Provider of Andr...Structural Relationship between Content Resolver and Content Provider of Andr...
Structural Relationship between Content Resolver and Content Provider of Andr...Somenath Mukhopadhyay
 
Flow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidFlow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidSomenath Mukhopadhyay
 
Implementation of a state machine for a longrunning background task in androi...
Implementation of a state machine for a longrunning background task in androi...Implementation of a state machine for a longrunning background task in androi...
Implementation of a state machine for a longrunning background task in androi...Somenath Mukhopadhyay
 
Tackling circular dependency in Java
Tackling circular dependency in JavaTackling circular dependency in Java
Tackling circular dependency in JavaSomenath Mukhopadhyay
 
Implementation of composite design pattern in android view and widgets
Implementation of composite design pattern in android view and widgetsImplementation of composite design pattern in android view and widgets
Implementation of composite design pattern in android view and widgetsSomenath Mukhopadhyay
 
Exception Handling in the C++ Constructor
Exception Handling in the C++ ConstructorException Handling in the C++ Constructor
Exception Handling in the C++ ConstructorSomenath Mukhopadhyay
 
Active object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureActive object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureSomenath Mukhopadhyay
 
Android Asynctask Internals vis-a-vis half-sync half-async design pattern
Android Asynctask Internals vis-a-vis half-sync half-async design patternAndroid Asynctask Internals vis-a-vis half-sync half-async design pattern
Android Asynctask Internals vis-a-vis half-sync half-async design patternSomenath Mukhopadhyay
 

More from Somenath Mukhopadhyay (20)

Significance of private inheritance in C++...
Significance of private inheritance in C++...Significance of private inheritance in C++...
Significance of private inheritance in C++...
 
Arranging the words of a text lexicographically trie
Arranging the words of a text lexicographically   trieArranging the words of a text lexicographically   trie
Arranging the words of a text lexicographically trie
 
Generic asynchronous HTTP utility for android
Generic asynchronous HTTP utility for androidGeneric asynchronous HTTP utility for android
Generic asynchronous HTTP utility for android
 
Copy on write
Copy on writeCopy on write
Copy on write
 
Java concurrency model - The Future Task
Java concurrency model - The Future TaskJava concurrency model - The Future Task
Java concurrency model - The Future Task
 
Memory layout in C++ vis a-vis polymorphism and padding bits
Memory layout in C++ vis a-vis polymorphism and padding bitsMemory layout in C++ vis a-vis polymorphism and padding bits
Memory layout in C++ vis a-vis polymorphism and padding bits
 
Developing an Android REST client to determine POI using asynctask and integr...
Developing an Android REST client to determine POI using asynctask and integr...Developing an Android REST client to determine POI using asynctask and integr...
Developing an Android REST client to determine POI using asynctask and integr...
 
Observer pattern
Observer patternObserver pattern
Observer pattern
 
How to create your own background for google docs
How to create your own background for google docsHow to create your own background for google docs
How to create your own background for google docs
 
The Designing of a Software System from scratch with the help of OOAD & UML -...
The Designing of a Software System from scratch with the help of OOAD & UML -...The Designing of a Software System from scratch with the help of OOAD & UML -...
The Designing of a Software System from scratch with the help of OOAD & UML -...
 
Structural Relationship between Content Resolver and Content Provider of Andr...
Structural Relationship between Content Resolver and Content Provider of Andr...Structural Relationship between Content Resolver and Content Provider of Andr...
Structural Relationship between Content Resolver and Content Provider of Andr...
 
Flow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidFlow of events during Media Player creation in Android
Flow of events during Media Player creation in Android
 
Implementation of a state machine for a longrunning background task in androi...
Implementation of a state machine for a longrunning background task in androi...Implementation of a state machine for a longrunning background task in androi...
Implementation of a state machine for a longrunning background task in androi...
 
Tackling circular dependency in Java
Tackling circular dependency in JavaTackling circular dependency in Java
Tackling circular dependency in Java
 
Implementation of composite design pattern in android view and widgets
Implementation of composite design pattern in android view and widgetsImplementation of composite design pattern in android view and widgets
Implementation of composite design pattern in android view and widgets
 
Exception Handling in the C++ Constructor
Exception Handling in the C++ ConstructorException Handling in the C++ Constructor
Exception Handling in the C++ Constructor
 
Active object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureActive object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architecture
 
Android services internals
Android services internalsAndroid services internals
Android services internals
 
Android Asynctask Internals vis-a-vis half-sync half-async design pattern
Android Asynctask Internals vis-a-vis half-sync half-async design patternAndroid Asynctask Internals vis-a-vis half-sync half-async design pattern
Android Asynctask Internals vis-a-vis half-sync half-async design pattern
 
Composite Pattern
Composite PatternComposite Pattern
Composite Pattern
 

Recently uploaded

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

Uml training

  • 1. UML Training by Somenath Mukhopadhyay +91 9748185282 som@som-itsolutions.com / som.mukhopadhyay@gmail.com
  • 2. Part I – Use Case Part II – Class Diagram Part III – Sequence Diagram
  • 4. What is a Use Case ● A formal way of representing how a business system interacts with its environment ● Illustrates the activities that are performed by the users of the system ● A scenario-based technique in the UML ● A sequence of actions a system performs that yields a valuable result for a particular actor.
  • 5. What is an Actor? ● A user or outside system that interacts with the system being designed in order to obtain some value from that interaction ● Use Cases describe scenarios that describe the interaction between users of the system (the actor) and the system itself.
  • 6. ● 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. ● Use case diagrams are closely connected to scenarios. A scenario is an example of what happens when someone interacts with the system.
  • 7. Step 1 - Identify the actors As we read the scenario, define those people or systems that are going to interact with the scenario. A customer enters a restaurant and requests for a table. The receptionist finds an empty table and asks the customer to occupy it.
  • 8. Questions for identifying People Actors ● Ask client and domain experts how system will be used ● Who will perform the obvious tasks? Secondary tasks of maintenance and administration? Interact with other systems?
  • 9. Questions for identifying other Actors ● What other entity is interested in the scenario/system? ● What other entity will supply the scenario/system with this information, use this information, and remove this information? ● Does the system use an external resource?
  • 10. Actors An Actor is outside or external the system. It can be a: ● Human ● Peripheral device (hardware) ● External system or subsystem ● Represented by stick figure
  • 11. Step 2 – Recording the use case For each actor, what interactions they require of the system – each is a use case ● What tasks does the actor want the system to perform ● What information must the actor provide to the system ● Are there events that the actor must tell system about ● Does actor need to be informed when something happens ● Does actor help initialize or shut down the system
  • 12. Case Study – Restaurant System Actor : Customer ● What tasks does the actor want the system to perform? - Find an empty table to occupy, display the menu card, take the order & accept the payment ● What information must the actor provide to the system? - How many guests are there with him, choice of his menu and how many plates for each of them ● Are there events that the actor must tell system about? - Whether he wants to pay through credit card/check/cash ● Does actor need to be informed when something happens? - If any menu chosen by the customer is not available he has to be informed ● Does actor help initialize or shut down the system - no
  • 13. Resulting Use Cases – Actor : Customer Customer enters the Restaurant and asks the receptionist for an empty table Customer looks at the menu & places an order Customer is notified when any item of the menu is not available Customer complets the food, leaves the table and pays the bill Note: simple phrases, without much details initially.
  • 14. Other Actors ● The receptionist opens the chart of the empty table and suggests one to the customer ● The waiter takes order from the customer, notifies him if anything is not available and serves him the food ● The cashier calculates the bill and gives it to the customer ● An external system (say a tablet) may be used as an Actor for displaying & ordering the menu
  • 15. Use Cases – Restaurant System Use Case Name Request A Table Actor Customer Description Describes the process when a customer steps inside a restaurant and asks the Receptionist/May I Help You for a Table Normal Flow Customer enters the Restaurant and asks for a table Exceptional Flow None
  • 16. Use Case Name ProduceTheTableChart Actor Receptionist/May I Help You Description Describes the process when the receptionist opens the chart to see which table is empty Normal Flow 1. Receptionist opens the chart and finds out which table is empty 2. She asks the customer to occupy the vacant table Exceptional Flow If all the tables are occupied, the receptionist puts the customer in a queue
  • 17. Use Case Name Manage Menu & Order Actor External System (Say a Tablet) Description It displays the menu items and their prices Normal Flow 1. Displays the menu items and their prices 2. Lets one to choose and pick from the list and how many plates for each item Exceptional Flow When a menu item is not available, it lets others know about that
  • 18. Use Case Name Place An Order Actor Customer Description Describes the process when a customer looks at the menu table and orders for some items Normal Flow 1. Customer looks at the menu table 2. Customer chooses some from the table and decides how many plates for each menu item 3. Customer places the order Exceptional Flow None
  • 19. Use Case Name Collects The Order Actor Waiter Description Describes the process when a waiter collects an order from a customer and serves foods to the later Normal Flow 1. Waiter collects the order from the customer 2. Waiter delivers the food Exceptional Flow When any menu item is not available the waiter lets the customer know abotu it
  • 20. Use Case Name Collect Money Actor Cashier Description Describes the process when a customer wants to pay the bill Normal Flow 1. Cashier opens the Billing System and find out how much is due for the current customer 2. Cashier asks the customer what kind of payment method the later wants to use : Cash/Credit Card/Check 3. If the customer wants to pay using credit card, the cashier processes it using a machine 4. The cashier collects the money Exceptional Flow When the customer does not have any credit balance in his credit card
  • 21. Use Case Name Update Account Info Actor Cashier Description Describes the process when the cashier updates the Account Info in the main System after the customer pays the bill Normal Flow The cashier updates the Account Info in the System Exceptional Flow None
  • 22. Use Case Name Produce Billing System Info Actor External System ( May be a Tablet) Description Describes the process when the Actor interacts with the Server/Legacy System to show the amount due for the current customer Normal Flow Starts interacting with the backend system and shows the Amount due for the current customer Exceptional Flow The Backend system is down
  • 23. Use Case Name Pay Bill Actor Customer Description Describes the process when the customer wants to pay the bill Normal Flow The customer proceeds to the cash counter and pays the bill Exceptional Flow None
  • 24. Use Case Name Pay Bill By Cash Actor Customer Description Describes the process when the customer wants to pay the bill in Cash Normal Flow The customer proceeds to the cash counter and pays the bill in Cash Exceptional Flow The customer does not have the required amount of cash at that moment
  • 25. Use Case Name Pay Bill By Cheque Actor Customer Description Describes the process when the customer wants to pay the bill through Check Normal Flow The customer proceeds to the cash counter and pays the bill through check Exceptional Flow None
  • 26. Use Case Name Pay Bill By Credit Card Actor Customer Description Describes the process when the customer wants to pay the bill through Credit Card Normal Flow The customer proceeds to the cash counter and pays the bill through Credit Card Exceptional Flow The customer does not have the required credit amount in his credit card account
  • 27. Relationships between Use Cases ● Include ● Extend
  • 28. Include Relationship ● Represents the inclusion of the functionality of one use case within another ● Arrow is drawn from the base use case to the used use case ● Write << include >> above arrowhead line
  • 29. Restaurant System – Use Case Diagram
  • 31. What is a Class Diagram ● A Class Diagram is a diagram describing the static structure of a system ● It shows the system's ● classes ● attributes ● operations (or methods), ● Relationships among the classes.
  • 32. Essential elements of a UML Class Diagram ● Class ● Attributes ● Operations ● Relationships ➔ Dependency ➔ Aggregation ➔ Composition ➔ Inheritance ➔ Realization ● Constraint Rules and Notes
  • 33. Class ● A class in UML Class Diagram has ➔ Attributes ( state) ➔ Operations (behavior) ● It has static relationship with the other classes of the system ● Each Atrribute & Operation has different visibilities ➔ “+” for public ➔ “-” for private ➔ “#” for protected
  • 35. The relationships are called as ● Dependency : class A uses class B ● Aggregation : class A has a class B ● Composition : class A owns a class B ● Inheritance : class B is a Class A (or class A is extended by class B) ● Realization : class B realizes Class A (or interface A is realized by class B)
  • 36. Dependency Dependency is represented when a reference to one class is passed in as a method parameter to another class or a local variable of another class is created in a member function. For example, an instance of class B is passed in to a method of class A: ● public class A { public void doSomething(B b) { ....... } ● public class A{ public void doSomething(){ B b = new B(); ......... }
  • 37. Aggregation If class A stored the reference to class B for later use we would have a different relationship called Aggregation. A common and obvious example of Aggregation would be via setter injection: ● public class A { private B _b; public void setB(B b) { _b = b; }
  • 38. Composition ● Aggregation is the weaker form of object containment (one object contains other objects). The stronger form is called Composition. In Composition the containing object is responsible for the creation and life cycle of the contained object (either directly or indirectly) ● In the next three slides you will see the example of composition
  • 39. Composition – via member initialization ● public class A { private B _b = new B();
  • 40. Composition - via constructor initialization ● public class A { private B _b; public A() { _b = new B(); } // default constructor
  • 41. Composition – via lazy initialization public class A { private B _b; public void doSomethingUniqueToB() { if (null == _b) { _b = new B(); } return _b.doSomething(); } // doSomethingUniqueToB()
  • 42. Inheritance public class A { ... } // class A public class B extends A { .... } // class B
  • 43. Realization public interface A { ... } // interface A public class B implements A { ... } // class B
  • 44. Case Study – Restaurant System Find out the nouns from the Use Case Analysis. These are likely to be major classes. First the classes for the major Actors ● Customer ● Receptionist ● Waiter ● Cashier
  • 45. Case Study – Restaurant System
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. Refactoring – Introducing Employee Class
  • 57.
  • 59. ● UML Specifies a number of interaction diagrams to model dynamic aspects of the system ● Dynamic aspects of the system – Messages moving among objects of classes – Flow of control among objects – Sequences of events
  • 60. Dynamic Diagram The most important dynamic diagrams are - ● Interaction Diagrams - Set of objects or roles and the messages that can be passed among them – Sequence Diagrams - emphasize time ordering – Communication Diagrams - emphasize structural ordering ● State Diagrams - State machine consisting of states, transitions, events and activities of an object
  • 61. Sequence Diagram ● Describe the flow of messages, events, actions between objects ● Show concurrent processes and activations ● Show time sequences that are not easily depicted in other diagrams ● Typically used during analysis and design to document and understand the logical flow of your system
  • 62.
  • 63. Participating Objects ● Squares with object type, optionally preceded by object name and colon ● Object's "life line" represented by dashed vertical line ● Message (method call) indicated by horizontal arrow to other object
  • 64. Messages ● Messages are (method call) indicated by horizontal arrow to other object ● Dashed arrow back indicates return (optional) ● Different arrowheads for normal / concurrent (asynchronous) methods
  • 65. Lifetime of Objects ● Creation: arrow with 'new/create' written above it – notice that an object created after the start of the scenario appears lower than the others ● Deletion: an X at bottom of object's lifeline – Java doesn't explicitly delete objects; they fall out of scope and are garbage-collected