Auburn University http://www.eng.auburn.edu/~xqin COMP 2710 Software Construction Use Case Analysis – Examples and Exercises Dr. Xiao Qin Auburn University.

Slides:



Advertisements
Similar presentations
Use Case Diagrams Damian Gordon.
Advertisements

Use Case & Use Case Diagram
Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Interaction Diagrams.
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 7 – More on use cases and activity diagrams.
9/10/2004Use Case Workshop 1 CSC480 Software Engineering Workshop 1 Requirements Modeling.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Tutorial 2. What is a UML Use Case Diagram? Use case diagrams model the functionality of a system using actors and use cases. Use cases are services or.
Chapter 15: System Modeling with UML
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
Documenting Requirements using Use Case Diagrams
COMP1007 Intro to Systems Requirements © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Intro to System Requirements Lecture 2 Use-Cases.
Requirements Analysis 4. 1 Use Case I b504.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis Use-Cases.
Use Case Modeling.
Adding the Detail Filling in Use Case Templates. Use Case Template The use case diagram is important for visualizing a system and as a communication tool.
Use Case Diagram.
UML REVIEW –PART1 1. Introduction What is UML visual modelling language UML is a language not a methodology? Q: why is this distinction important? UML.
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Requirements Analysis via Use Cases SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Faculty of Computer & Information
1 Structuring Systems Requirements Use Case Description and Diagrams.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Use Cases Use Cases are employed to describe the functionality or behavior of a system. Each use case describes a different capability that the system.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
UML (Unified Modeling Language)
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
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.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
ACO 101: Use cases What do the users do?. When building a system You begin with the Use Case Analysis – When looking at the system as a whole, Use Case.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Systems Analysis and Design in a Changing World, Fourth Edition
Using Use Case Diagrams
Use Case Modeling - II Lecture # 27.
Lec-5 : Use Case Diagrams
M.M. Pickard, PhD A Primer on Use Cases (Reference: UML Superstructure Specification, v2.1.1)
Use Case Model.
Unified Modeling Language
Week 10: Object Modeling (1)Use Case Model
UML Use Case Diagrams.
Object-Oriented Analysis Principles using UML
Start at 17th March 2012 end at 31th March 2012
System Modeling Chapter 4
Auburn University COMP 2710 Software Construction Use Case Analysis and Exercises (Part 2) Dr. Xiao Qin Auburn University.
Concepts, Specifications, and Diagrams
Princess Nourah bint Abdulrahman University
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer
Systems Analysis and Design With UML 2
Week 12: Activity & Sequence Diagrams
Object Oriented Analysis and Design
Relating Use Cases popo.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Software Design Lecture : 15.
Use Case Model Use case diagram – Part 2.
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Interaction Modeling Extracted from textbook:
Object-Oriented Software Engineering
Test Design Techniques Software Testing: IN3240 / IN4240
UML Design for an Automated Registration System
Presentation transcript:

Auburn University http://www.eng.auburn.edu/~xqin COMP 2710 Software Construction Use Case Analysis – Examples and Exercises Dr. Xiao Qin Auburn University http://www.eng.auburn.edu/~xqin xqin@auburn.edu

Review: Generalization vs. Extend A use case generalization shows that one use case is simply a special kind of another. References: Visual Case - UML Tutorial – Use Case Diagram.pdf Generalization: (not very popular) When a use case describes a variation on another use case, use a generalization link.  In the example below, the use case limit exceeded describes a situation in which the usual scenario of online purchase is not performed.  Use cases that generalize another use case should only specify an alternative, even exceptional, scenario to the use case being generalized.  The overall goal of the use cases should be the same. (Same Goal) Extend: In some instances you want to describe a variation on behaviour in a more controlled form.  In such instances you can define extension points in the extended use case.  In the example below, search by name is said to extend search at the name extension point.  The extends link is more controlled than the generalization link in that functionality can only be added at the extension points. (different Goal) An extend relationship indicates that one use case is a variation of another. Adding actions. 2

Extend vs. Include Extend is used when a use case conditionally adds steps to another first class use case. e.g., An ATM machine: “Assess Fee” extends “Withdraw Cash” and describe the conditional "extension point" that is instantiated when the ATM user is not a member. Basic "Withdraw Cash“ stands on its own, without the extension. Include is used to extract use case fragments that are duplicated in multiple use cases. The included use case cannot stand alone and the original use case is not complete without the included one. Extend is used when a use case conditionally adds steps to another first class use case. For example, imagine "Withdraw Cash" is a use case of an ATM machine. "Assess Fee" would extend Withdraw Cash and describe the conditional "extension point" that is instantiated when the ATM user doesn't bank at the ATM's owning institution. Notice that the basic "Withdraw Cash" use case stands on its own, without the extension. Include is used to extract use case fragments that are duplicated in multiple use cases. The included use case cannot stand alone and the original use case is not complete without the included one. This should be used sparingly an only in cases where the duplication is significant and exists by design (rather than by coincidence). For example, the flow of events that occurs at the beginning of every ATM use case (when the user puts in their ATM card, enters their PIN, and is shown the main menu) would be a good candidate for an include. This may be contentious but the "includes are always and extends are sometimes" is a very common misconception which has almost taken over now as the de-facto meaning. Here's a more correct approach (in my view, and checked against Jacobson, Fowler, Larmen and 10 other references). Relationships are dependencies The key to Include and extend use case relationships is to realise that, common with the rest of UML, the dotted arrow between use cases is a dependency relationship. I'll use the terms 'base', 'included' and 'extending' to refer to the use case roles. include A base use case is dependent on the included use case(s); without it/them the base use case is incomplete as the included use case(s) represent sub-sequences of the interaction that may happen always OR sometimes. ( This is contrary to popular misconception about this, what your use case suggests always happens in the main scenario and sometimes happens in alternate flows simply depends on what you choose as your main scenario; use cases can easily be restructured to represent a different flow as the main scenario and this should not matter). In the best practice of one way dependency the base use case knows about (and refer to) the included use case, but the included use case shouldn't 'know' about the base use case. This is why included use cases can be: a) base uses case in their own right and b) shared by a number of base use cases. extend The extending use case is dependent on the base use case; it literally extends the behaviour described by the base use case. The base use case should be a fully functional use case in its own right ('include's included of course) without the extending use case's additional functionality. Extending use cases can be used in several situations: a) The base use case represents the "must have" functionality of a project while the extending use case represents optional (should/could/want) behaviour. This is where the term optional is relevant - optional whether to build/deliver rather than optional whether it sometimes runs as part of the base use case sequence. b) In phase 1 you can deliver the base use case which meets the requirements at that point, and phase 2 will add additional functionality described by the extending use case. This can contain sequences that are always or sometimes performed after phase 2 is delivered (again contrary to popular misconception). c) It can be used to extract out sub sequences of the base use case, especially when they represent 'exceptional' complex behaviour with its own alternative flows. One important aspect to consider is that the extending use case can 'insert' behaviour in several places in the base use case's flow, not just in a single place as an included use case does. For this reason it is highly unlikely that an extending use case will be suitable to extend more than one base use case. As to dependency, the extending use case is dependant on the base use case and is again a one way dependency, i.e. the base use case doesn't need any reference to the extending use case in the sequence. That doesn't mean you can't demonstrate the extension points or add a x-ref to the extending use case elsewhere in the template; but the base use case must be able towork without the extending use case. 3

Extend vs. Include Wheels Car DVD players 4

Use Case Diagrams UML use case relationship -symbols Relationships: Use cases may be related to other use cases. Excerices 5

Use Case Diagram - Exercise Actors: customer, waiter, chef, cashier Use Cases: order food, cook food, serve food, eat food, order wine, serve wine, drink wine, pay for food, pay for wine Use case relationships? 6

Use Case Diagram – An Example References: Visual Case - UML Tutorial – Use Case Diagram.pdf Generalization: When a use case describes a variation on another use case, use a generalization link.  In the example below, the use case limit exceeded describes a situation in which the usual scenario of online purchase is not performed.  Use cases that generalize another use case should only specify an alternative, even exceptional, scenario to the use case being generalized.  The overall goal of the use cases should be the same. Extend: In some instances you want to describe a variation on behaviour in a more controlled form.  In such instances you can define extension points in the extended use case.  In the example below, search by name is said to extend search at thename extension point.  The extends link is more controlled than the generalization link in that functionality can only be added at the extension points. Goto 9 7

UML use case relationship symbols - Generalization A use case that is a variation on normal behavior of another use case describes a generalization relationship. These generalization use case relationships can be used to describe actions when an alternative behavior must be carried out for some reason. 8

UML use case relationship include or use – Exercise Review Transcript Data use case is used by the Register for Course use case to be sure the student has met the course's prerequisites. Review Transcript Data use case is also used by Graduate Student use case to be sure that all program requirements have been met for graduation. reviewer ------- (review transcript data) <-- include -- (register for course) ^ | include (graduate student) 9

UML use case relationship symbols – extend or extends A use case may extend a use case by adding new actions to it. <<includes>>, <<include>>, <<use>>, <<uses>> 10

UML use case relationship extend or extends – Exercise Use case Register for Distance Course may extend use case Register for Course. Additional actions must be performed when a student registers for a distance course. reviewer ------- (register for course) <-- extend -- (register for distance course) 11

Use Case Template See also: A Use Case Template.pdf Reference: http://www.bredemeyer.com/pdf_files/use_case.pdf 12

Use Case – An Example See also: A Use Case Template.pdf The example below shows a use case that describes the interactions involved in repairing a cellular network. The business goal of the (primary) actor the Operator is to repair the network. The other active participants are the cellular network itself and a field maintenance engineer. The source information for the use case comes from two sources viz. Operating Manual [1993] and [Jones 1998]. In order for the use case to succeed it is assumed that any changes that are sent to the cellular network will not fail. That is the network cells will change as directed. 13

Extending a Use Case See also: A Use Case Template.pdf Reference: http://www.bredemeyer.com/pdf_files/use_case.pdf 14

Extending a Use Case – An example See also: A Use Case Template.pdf 15

Use Case - Exercise 16

Summary Use Cases describe the behavioral aspects of the system. Use cases are not design tools. Use Cases are a convenient way to document the functions that the system must support. Use Cases are used to identify the components (classes) of the system. Use case relationships? Why use cases are not design tools? - Just functional descriptions not software structure. 17