Upload
himzzfunny
View
257
Download
1
Embed Size (px)
DESCRIPTION
This document provides knowledge on UML diagrams particularly used for business analysis
Citation preview
UML Diagrams
• Use Case Diagram• Activity Diagram• Sequence Diagram• Collaboration Diagram• Class Diagram• State Transition Diagram• Component Diagram• Deployment Diagram
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
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
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.
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.
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.
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
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
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
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
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.
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
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.
Component Diagram
• Component diagrams illustrate the organization and dependencies among software components.
Course.dll
People.dll
Course
User
Register.exeBilling.exe
BillingSystem
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.
Deployment Diagram
• The deployment diagram visualizes the distribution of components across the enterprise.
Registration Database
Library
Dorm
Main Building
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
• A use-case diagram can be modeled in a number of ways.
(from List Property)
(from Maintain Profile)
• 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
Relationships
• UML supports several types of relationships. These include– Communication relationships– Uses/Includes relationships– Extends relationships– Actor Generalization relationships
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.
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>>
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>>
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.
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.
Use-Case Flow of Events Has one normal, basic flow
(“Happy Path”) Several alternative flows
Regular variantsOdd casesExceptional flows handling error situations
“Happy Path”
What Are Scenarios?
A scenario is an instance of a use case.
Scenarios make excellent test cases.
Use-Case Realization
Class Diagrams
Sequence Diagrams
Use Case
Collaboration Diagrams
Use-Case Model Design Model
Use Case Use-Case Realization