Use Case Diagrams. Use cases modeling Overview Motivation Communication between developers and users Users don’t know system, developers don’t know users’

Slides:



Advertisements
Similar presentations
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Advertisements

Activity Diagrams in UML. Definition Activity diagrams represent the dynamics of the system. They are flow charts that are used to show the workflow of.
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 5a: Sequence Interaction Diagrams CSE 111 Copyright W. Howden1.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Essentials of interaction diagrams Lecture 23 & 24.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Use Case Diagrams. Use Case Use case A view to system seen from outside(user) User’s requirements on system A set of scenario for an actor to achieve.
SE-565 Software System Requirements More UML Diagrams.
1 Business Models Modeling. 2 Why Model the Business Business modeling is a technique to help answer critical questions, such as: What do the workers.
Sequence diagram example T120B029P pavasaris.
Unified Modeling Language
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Activity Diagram.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Class, Sequence and UML Model.  Has actors and use cases.
BPMN By Hosein Bitaraf Software Engineering. Business Process Model and Notation (BPMN) is a graphical representation for specifying business processes.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
Chapter 7 Structuring System Process Requirements
Interaction diagrams Sequence and collaboration diagrams.
Interaction Modeling. Introduction (1) Third leg of the modeling tripod. It describes interaction within a system. The class model describes the objects.
The Object-Oriented Approach to Requirements
Systems Analysis and Design in a Changing World, Fifth Edition
Systems Analysis and Design in a Changing World, 6th Edition
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Drawing System Sequence Diagrams
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 5 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH CHAPTER.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Systems Analysis and Design in a Changing World, Fourth Edition
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
UML (Unified Modeling Language)
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Chapter 3: Introducing the UML
1 Activity Diagram. Activity Diagrams 1.Activity diagrams are the object-oriented equivalent of flow charts and data-flow diagrams from structured development.
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
 The Sequence Diagram models the collaboration of objects based on a time sequence.  It shows how the objects interact with others in a particular scenario.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
UML Diagrams By Daniel Damaris Novarianto S..
Systems Analysis and Design in a Changing World, 6th Edition
Unified Modeling Language
Activity and State Transition Diagram
UML Diagrams Jung Woo.
Business System Development
UML Activity Diagrams.
Object Oriented Analysis and Design
Systems Analysis and Design in a Changing World, 6th Edition
Week 12: Activity & Sequence Diagrams
UML Interaction diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Appendix 3 Object-Oriented Analysis and Design
Behavioral Diagrams P. P. Mahale
Presentation transcript:

Use Case Diagrams

Use cases modeling Overview Motivation Communication between developers and users Users don’t know system, developers don’t know users’ work Users’ requirement needs to be clearly defined agreement between user and developer is necessary. Use case Visual model both users and developers can easily understand

Use Case Modeling system modeling from user’s perspective A way to define functional requirements from user Easy to understand Normally done during system analysis step Implementation issue is not considered Increase the probability of making a system user really wants

Use Case Use case A view to system seen from outside User’s requirements on system A set of scenario for an actor to achieve useful works Bank clientBank system Withdraw Transfer Balance check deposit

Basic Concepts Actor An external person, process or thing interacting with a system, subsystem, or class User Case Each describes a possible kind of interaction between an actor and the system Use cases are actions that a user takes on a system System The entity that we are going to build Can have subsystems in it Relationship Connection between actors and use cases or use cases and use cases. The first represents communication, the second represents higher level relationship

Actors a user of the system Can be a person or another system Identify the actors in terms of their roles – not their names Actor is shown with a stick figure

Use Case Use cases are actions users take on the system can be very high level or so fine-grained that they cannot contain any other functionality Use “verb” or “verb+noun” style naming Notation Characteristics Describes how a system can be used by an actor Represents services provided by a system User requirements borrowreturn

System System refers to the module that performs the function Use case diagram could show a part of the system, referred to as a subsystem System or the sybsystem is shown as a rectangle enclosing the use cases, with the system name in the rectangle Library System

Relationship (Use Case Diagram) There are four kinds of relationships Association Extend Include generalization

Association Relationship Shown by a line connecting actors to use cases An Actor can relate to many use cases and a use case can relate to many actors

Include Relationship Between a use case and another use case use case A includes the functionality of use case B (has-a relationship) A B >

Extend Relationship Use case can be extended by another use case At the extension point, use case is extended Extension point Shows the exact extension point between the two use cases Shows the actual logic necessary for one use case to extend another

Example : Extend Relationship

Generalization Relationship Indicate an inheritance of an item in UML Can be applied to actors as well as use cases

Creating Use Case Diagrams There are five tasks involved in creating use case diagrams 1. Identify actors of the system. Identify use cases of the system. Identify the relationships. 2. Prioritize the use cases if necessary. 3. Detail each use case. Describe Basic flow and Alternative flows for each use case 4. Identify generalizations. Identify include relationships. Identify extend relationships. 5. Create use case diagram.

Example

Example

Activity Diagram

What is Activity Diagram Shows overall flow of control (just like flowchart) A simplified look at what happens during a process Business and operational step-by-step workflows of components in a system

Activity Diagram Notations

Decision Activity1 Activity2 Wake Up Eat BreakfastGo Back to Sleep [hungry][Not hungry] Wake Up Eat BreakfastGo Back to Sleep [hungry][Not hungry] Transition from one activity to another Two ways of showing a decision

Concurrent Path, Signal Work Out ShowerRelax Television Show New Channel Change (channel) Press Channel Number Change(channel) Remote.keyln(channel) Watch Concurrent Path Signal : when received, the signal causes an activity to take place (send : convex, receive : concave ) Synchronization bar

Example of Activity Diagram A Process : Creating a Document 1. Open the word processing package 2. Create a file 3. Save the file under a unique name within its directory 4. Type the document 5. If graphics are necessary, open the graphics package, create the graphics, and paste the graphics into the document 6. If spreadsheet are necessary, open the spreadsheet package, create the spreadsheet, and paste the spreadsheet into the document 7. Save the file 8. Print a hard copy of the document 9. Exit the office suite

활동 다이어그램 Open Word Processing Package Create File Save File Type the Document Open and Use Graphics Package Open and Use Spreedsheet Save File Print Hardcopy Exit Office Suite [graphics needed] [graphics not needed] [tables needed] [tables not needed]

show who has responsibility for each activity. (role) 1.A salesperson calls the client and sets up an appointment 2.Onsite appointment(In the consulting firm’s office) - corporate technicians prepare a conference room for a presentation 3.Offsite appointment(at the client’s office) - a consultant prepares a presentation on a laptop 4.The consultant and the salesperson meet with the client at the agreed-upon location and time 5.the salesperson follows up with a letter 6.If the meeting has resulted in a statement of a problem, the benefit – the activities of each role are clarified Swimlanes 9

Call client and set up appointment Prepare a conference room Prepare a laptop [appointment onsite] [appointment offsite] Meet with the client Send followup letter Create proposal Send proposal to client See the Activity Diagram for Creating a Document [statement of problem] [no statement problem] 10 AD

Call client and set up appointment Prepare a conference room Prepare a laptop [appointment onsite] [appointment offsite] Meet with the client Send followup letter Create proposal Send proposal to client [statement of problem] [no statement problem] See the Activity Diagram for Creating a Document Sales PersonConsultantCorporate Technician AD with Swimlane

Example

State Diagram

Objects change their state in response to events State Diagram presents the states an object can be transitions between the states and Starting point Endpoint Difference from class diagram, use case diagram changes over time represents states of a single object

State Diagram Components State Icon, Transition, Starting Point, Endpoint State Icon : State Name(Required), Activity Activity : Event and Action entry : what happens when the system enters the state exit : what happens when the system leaves the state do : what happens while the system is in the state Transition : Change states, arrow Occurs in response to trigger event Event and action => separated by ‘/’ triggerless transition guard condition => Boolean expression

Notation state name state variable activity event / action or [guard condition ] Event / action or [guard condition]

Basic UML State Diagram top ReadyReady stop /ctr := 0stop StateState TriggerTrigger ActionAction InitialpseudostateInitialpseudostate TransitionTransition FinalstateFinalstate DoneDone “top” state

PC State Diagram

Example1 : flashing lamp LampFlashingLampFlashing 1sec/ FlashOffFlashOff entry/lamp.off()FlashOnFlashOnentry/lamp.on() off/ LampOffLampOffentry/lamp.off() LampOnLampOn entry/lamp.on() on/ flash/ on/ Default transition to the initial pseudostate Default transition to the initial pseudostate Group transition

Example2 : dialing

ex3 : login of an online banking system

Substates Sequential substates Concurrent substates

Activity Diagram vs State Diagram State Diagram A clear picture of the changes in the object’s state in a process Activity Diagram Flow chart : flow of activity of a process

Sequence Diagram

Purpose of Sequence Diagram to show the interactions between objects in the sequential order shows the sequence of messages for a particular task from a use case diagram Understand how objects in system interact with each other Understand how use case(scenario) can be refined with detailed information Use cases are often refined into one or more sequence diagrams

Sequence Diagram Time, object, and message Lifeline and activation :Name Notation

Basics Focus on order in which messages occur :Name1:Name2 lifeline activation message object objects time

Messages The first message starts at the top, typically located on the left side Subsequent messages are then added to the diagram slightly lower then the previous message Messages can be sent to itself : synchronous call operation : method on the arrow : asynchronous signal : return message (optional) : return value on the arrow

An example of messages being sent between objects The system object calling its determineAvailableReports method

Synchronous vs asynchronous

guards Used when a condition must be met for a message to be sent

Combined fragment A combined fragment is used to group sets of messages together to show conditional flow in a sequence diagram Alternatives Options loops

alternatives Design mutually exclusive choice between two or more message sequences

option Model a sequence that occur when a certain condition is satisfied

loops model a repetitive sequence

Sequence diagram example Object Message Activation Time constraint Comment

Example

Sequence Diagram : Why Useful? shows the interaction logic between the objects in the system in the time order that the interactions take place.

Communication Diagram

Class diagrams indicates what classes are part of our system, what they offer, how they relate, but they don’t tell us how they communicate. Communication diagrams show (used to model) how objects interact and their roles. Similar to Sequence Diagrams. Communication Diagram := Class Diagram + Sequence diagram Sequence Diagrams are arranged according to Time. Communication Diagrams represent the structural organization of object. Both Sequence and Communication diagrams are called interaction diagrams

Communication diagram Objects interact to perform some task Links (messages) which show associations between objects Similar to sequence diagram arrows Actors from the use case diagrams

Symbols :Name1 :Name2 :Name3 1:Add() 2:Modify() 3:Update() Numbering : The order of messages ex) 1,2,3, …, 3.1, 3.2

Example

Ex) Soda Machine : Simple Scenario

Ex) Soda Machine : Complex Scenario