uml diagrams & use case in particular
DESCRIPTION
This document provides knowledge on UML diagrams particularly used for business analysisTRANSCRIPT
![Page 1: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/1.jpg)
UML Diagrams
• Use Case Diagram• Activity Diagram• Sequence Diagram• Collaboration Diagram• Class Diagram• State Transition Diagram• Component Diagram• Deployment Diagram
![Page 2: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/2.jpg)
Use Case Diagram• These diagrams show the interaction
between use-cases and actors• A use case represents system
functionality, an actor represents the people or systems that provide/receive information from the system.
• Show the overall functionality
of the system
Actors
Use cases
![Page 3: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/3.jpg)
Use-Case Diagram
• Use-case diagrams are created to visualize the interaction of your system with the outside world.
Student
Registrar
Professor
Billing System
Register for Courses
Request Course Roster
Maintain Course Information
![Page 4: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/4.jpg)
Activity Diagram
Select courses to teach
Create curriculum
Create catalog
Place catalog in bookstore
Open registration
Close registration
[ Registration time period expired ]
Mail catalog to students
• An activity diagram shows the flow of events within our system.
![Page 5: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/5.jpg)
Sequence Diagrams• These diagrams are used to show the
flow of functionality thru a use case.• Any actors involved are shown at the top
of the diagram, the objects are also shown at the top
• Sequence diagrams
display objects
not classes.
![Page 6: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/6.jpg)
Sequence Diagram
: Student registration form
registration manager
math 101
1: fill in info
2: submit
3: add Joe to Math 101
4: add Joe5: are you open?
6: add Joe
math 101 section 1
• A sequence diagram shows step by step what must happen to accomplish a piece of functionality provided by the system.
![Page 7: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/7.jpg)
Collaboration Diagram• These show exactly the same information
as the sequence diagrams but in a different way and with a different purpose
• Seq. diagrams represent object/actor interactions over time, collaboration diagrams show that w/o reference to time.
Collaboration Diagrams
![Page 8: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/8.jpg)
Collaboration Diagram• A collaboration diagram displays object
interactions organized around objects and their links to one another.
: Registrar
course form : CourseForm
theManager : CurriculumManager
aCourse : Course
1: set course info2: process
3: add course
4: new course
![Page 9: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/9.jpg)
Class Diagram• Show the interaction between classes in
the system.• Each class on a Class Diagram is
represented by a rectangle divided into three sections showing class name, attributes , operations.
• The lines show the
communications between
the classesClass Diagrams
![Page 10: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/10.jpg)
Class Diagram• A class diagram shows the structure of
your software.
Course
Student
Professor
RegistrationUser
RegistrationForm
RegistrationManager
CourseOffering
ScheduleAlgorithm
addStudent(Course, Student)
open()addStudent(StudentInfo)
open()addStudent(Student)
major
namenumberCredits
locationtenureStatus
name
10..*
0..*
1
1
1..*4
3..10
0..41
![Page 11: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/11.jpg)
State Transition Diagram• State transition diagrams provide a way to
model to the various states in which an object can exist.
• These are used to model the more dynamic behavior of a system ie: the behavior of an object.
• Ex: a bank account can exist in various states “ Open” , “Closed”, “Overdrawn”
• There is a “Start state” indicating the state that an object is in when it is first created and a “Stop state” shows what state object is in just before it is destroyed.
![Page 12: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/12.jpg)
State transition Diagram
• A state transition diagram shows the lifecycle of a single class.
entry: Register studentexit: Increment count
InitializationOpen
Closed
Canceled
do: Initialize course
do: Finalize course
do: Notify registered students
Add Student / Set count = 0
Add student[ count < 10 ]
[ count = 10 ]
Cancel
Cancel
Cancel
![Page 13: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/13.jpg)
Component Diagram
• Component diagrams show you a physical view of your model ie: the software components and relationships between them.
• Two types of components – executable components and code libraries.
![Page 14: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/14.jpg)
Component Diagram
• Component diagrams illustrate the organization and dependencies among software components.
Course.dll
People.dll
Course
User
Register.exeBilling.exe
BillingSystem
![Page 15: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/15.jpg)
Deployment Diagram• Deployment diagrams show you the
physical layout of the network and where the various components will reside.
• Used by project managers, users, architects and deployment staff to understand the physical layout of the system.
![Page 16: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/16.jpg)
Deployment Diagram
• The deployment diagram visualizes the distribution of components across the enterprise.
Registration Database
Library
Dorm
Main Building
![Page 17: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/17.jpg)
Use Case Diagram
Course Catalog
View Report Card
Register for Courses
Submit Grades
Select Courses to Teach
Student
Professor
Billing System
Maintain Student Information
Maintain Professor Information
Login
Close Registration
Registrar
![Page 18: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/18.jpg)
• A use-case diagram can be modeled in a number of ways.
(from List Property)
(from Maintain Profile)
![Page 19: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/19.jpg)
• A relationship illustrates a connection between two or more actors and use cases and between two or more use cases.
• In the UML, an association relationship is represented by a solid line with or without an arrow.
Relationships
Association Relationships
![Page 20: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/20.jpg)
Relationships
• UML supports several types of relationships. These include– Communication relationships– Uses/Includes relationships– Extends relationships– Actor Generalization relationships
![Page 21: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/21.jpg)
Communication Relationships
• This is a relationship between a use case and a actor. These are diagrammed using an arrow.
• The arrowhead indicates who initiates the communication.
![Page 22: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/22.jpg)
Uses Relationship
• A uses relationship allows one use case to use the functionality provided by another use case.
• These are used to model some reusable functionality that is common to two or more use cases.
• These are shown in UML with an arrow and the word <<uses>>
![Page 23: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/23.jpg)
Extends Relationship• An Extends relationship allows one use
case to optionally extend the functionality provided by another use case.
• The use case which provides the extending/using functionality is the ABSTRACT use case whereas the main use case is the CONCRETE use case
• These are shown in UML with an arrow and the word <<extends>>
![Page 24: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/24.jpg)
Actor Generalization Relation
• This relation is used to show that several actors have some commonality.
• This relation is only necessary if one type of actor behaves differently from the other as far as the system is concerned.
• Ex: Corporate / Individual customer are Concrete actors and a Customer is an Abstract actor.
![Page 25: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/25.jpg)
What Is a Flow of Events?
• A flow of events is a textual description of what the system does with regard to the use case and is part of the use-case specification.
• In Rose, you include each use case’s flow of events in the Use-Case View.
![Page 26: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/26.jpg)
Use-Case Flow of Events Has one normal, basic flow
(“Happy Path”) Several alternative flows
Regular variantsOdd casesExceptional flows handling error situations
“Happy Path”
![Page 27: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/27.jpg)
What Are Scenarios?
A scenario is an instance of a use case.
Scenarios make excellent test cases.
![Page 28: UML Diagrams & Use Case in Particular](https://reader030.vdocuments.us/reader030/viewer/2022033017/563db852550346aa9a929d19/html5/thumbnails/28.jpg)
Use-Case Realization
Class Diagrams
Sequence Diagrams
Use Case
Collaboration Diagrams
Use-Case Model Design Model
Use Case Use-Case Realization