Project Support: Actors and Use cases

Slides:



Advertisements
Similar presentations
Chapters 7 & 9 System Scope
Advertisements

Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
UCD Yong Choi BPA. What is UCD? A use case is a set of scenarios that describing an interaction between a user and a system. – What a system does…rather.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Use-case Modeling.
Object Oriented Design and UML
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Systems Analysis I Data Flow Diagrams
Use Case Diagram (UCD) Yong Choi BPA.
USE Case Model.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
> and > Use Case Diagram (Advanced Concept). When do I use the uses arrow? The uses arrow is drawn from a use case X to another use case Y to indicate.
Chapter 7 Structuring System Process Requirements
By: Md Rezaul Huda Reza  Process of modelling a system’s functions in terms of:  business events  who initiated the events.
Interaction Modeling. Introduction (1) Third leg of the modeling tripod. It describes interaction within a system. The class model describes the objects.
Chapter 5 Models and UML Notation for The Object-Oriented Approach.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
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 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.
Systems Analysis and Design in a Changing World, Fourth Edition
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
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 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
Ondřej Přibyl Faculty of Transportation Sciences, CTU DESIGN OF ITS SYSTEMS Project support 1 3 PROJECT SUPPORT Use cases.
Use Cases. 2 A use case... –Specifies the behavior of a system or some subset of a system. –Is a system-level function. –Does not indicative how the specified.
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
Business Process and Functional Modeling
Information Systems in Organizations 2
Welcome to M301 P2 Software Systems & their Development
Chapter 4: Business Process and Functional Modeling, continued
Business Process Modeling
Creating Oracle Business Intelligence Interactive Dashboards
Lec-5 : Use Case Diagrams
M.M. Pickard, PhD A Primer on Use Cases (Reference: UML Superstructure Specification, v2.1.1)
Use Case Model.
The Next Stage in Analysis: Systems Use Case Diagrams
Use Case Model Use case diagram.
Use Case Modeling.
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Systems Analysis and Design With UML 2
Chapter 9 Use Cases.
Week 12: Activity & Sequence Diagrams
Object Oriented Analysis and Design
Use Cases.
Chapter 20 Object-Oriented Analysis and Design
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Structural / Functional Site Diagramming
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Use Case Model Use case diagram – Part 2.
Graphs, Linear Equations, and Functions
Seminar 2 Design of Informatics Systems
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Interaction Modeling Extracted from textbook:
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Rational Rose 2000 Instructor Notes Use Case Realization Structure
Use Case Modeling Part of the unified modeling language (U M L)
IT 244 Database Management System
Chapter 22 Object-Oriented Systems Analysis and Design and UML
CIS 375 Bruce R. Maxim UM-Dearborn
Use Case Analysis – continued
Information System Design
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Presentation transcript:

Project Support: Actors and Use cases Telematics systems and their design Doc.Ing. Ondřej Přibyl, Ph.D. Department of applied mathematics Faculty of Transportation sciences, CTU

Project Task 3 Task #: Actors 1) Define graphically all actors in the system and relations among them Task #: Use case analysis 1) For the defined subsystems create structured UC. 2) Demonstrate traceability among requirements and UC

Actors

What is an actor? Definition An actor in the UML "specifies a role played by a user or any other system that interacts with the subject." An actor is a person, organization, or external system that plays a role in one or more interactions with your system. Actors are drawn as stick figures

Why to talk about Actors? Actor is everybody who interacts with the system i.e. he is using some of the functions (use cases)

Example: actors and use cases

Relationships among actors UML 2 does not permit associations between Actors Yet, this constraint is often violated in practice since the generalization/specialization relationship between actors is useful in modeling overlapping behaviours between actors

Relationships among actors (2) There are several types of relationships: An association between an actor and a use case An association between two use cases A generalization between two actors A generalization between two use cases

Additional text (source: UML by example by Ghinwa Jalloul )

Additional text (source: UML by example by Ghinwa Jalloul )

Example of actors Generalization

Alternative view (Example)

Actor description!! (Example)

Additional text (source: UML by example by Ghinwa Jalloul )

Writing effective use cases (Example ebay) - Actors Define your use case actors There are possibly over a dozen actors that interact with Ebay, from buyers and sellers, down to suppliers, wholesalers, auditors, and customer service. But we're going for grass-roots, so who are the basic users of Ebay? BUYERS and SELLERS. So lets put them down as our first actors. Do you notice how the actors aren't John and Sue which would be people? While John may be a seller and Sue may be a buyer, an actor is a Role. And a role in this case would be that of a buyer and that of a seller. Now that things are clicking, lets throw some more actors on your paper just so we can try and identify more possible users. Now we have a bunch of actors. Wait a minute? Paypal? That's not a person. An actor can be a system, because a system plays another role in the context of your new system and has goals and interacts with other actors as you will see later.

Identifying Actors Look for: the users who directly use the system also others who need services from the system To find actors that are people/roles ask: Who will be a primary user of the system? (primary actor) Who will need support from the system to do her daily tasks? Who will maintain, administrate, keep the system working? (secondary actor) Who or what has an interest in the results that the system produces ? To find actors that are external systems ask: Which hardware devices does the system need? With which other systems does the system need to interact with?

Sources Actor in Wikipedia Use case in Wikipedia Use Case document in our course web-sites

Use Cases

Major types in Use Case diagrams Use cases. A use case describes a sequence of actions that provide something of measurable value to an actor and is drawn as a horizontal ellipse. Actors. An actor is a person, organization, or external system that plays a role in one or more interactions with your system. Actors are drawn as stick figures. Associations.  Associations between actors and use cases are indicated in use case diagrams by solid lines. An association exists whenever an actor is involved with an interaction described by a use case.  Associations are modeled as lines connecting use cases and actors to one another, with an optional arrowhead on one end of the line. The arrowhead is often used to indicating the direction of the initial invocation of the relationship or to indicate the primary actor within the use case.  The arrowheads are typically confused with data flow and as a result I avoid their use. System boundary boxes (optional). You can draw a rectangle around the use cases, called the system boundary box, to indicates the scope of your system.  Anything within the box represents functionality that is in scope and anything outside the box is not.  System boundary boxes are rarely used, although on occasion I have used them to identify which use cases will be delivered in each major release of a system.  Figure 2 shows how this could be done. Packages (optional).  Packages are UML constructs that enable you to organize model elements (such as use cases) into groups. Packages are depicted as file folders and can be used on any of the UML diagrams, including both use case diagrams and class diagrams. I use packages only when my diagrams become unwieldy, which generally implies they cannot be printed on a single page, to organize a large diagram into smaller ones.  Figure 3 depicts how Figure 1 could be reorganized with packages.

Recommended process: actors and use cases Place Your Primary Actor(S) In The Top-Left Corner Of The Diagram Draw Actors To The Outside Of A Use Case Diagram Name Actors With Singular, Business-Relevant Nouns Associate Each Actor With One Or More Use Cases Actors Model Roles, Not Positions Actors Don’t Interact With One Another Introduce an Actor Called “Time” to Initiate Scheduled Events

Finding Use Cases For each actor, ask the following questions: Which functions does the actor require from the system? What does the actor need to do ? Does the actor need to read, create, destroy, modify, or store some kinds of information in the system ? Does the actor have to be notified about events in the system? Does the actor need to notify the system about something? What do those events require in terms of system functionality? Could the actor’s daily work be simplified or made more efficient through new functions provided by the system?

Introduction A use case describes a actions that provide a measurable value to an actor. Use Case Names Begin With a Strong Verb Name Use Cases Using Domain Terminology Place Your Primary Use Cases In The Top-Left Corner Of The Diagram Imply Timing Considerations By Stacking Use Cases.  As you see in Figure 1, the use cases that typically occur first are shown above those that appear later.

Example

Generalization Shows inheritance and specialization One use case is simply a special kind of another

Includes “Factor out” of a use case commonly used behavior Allows reuse of functionality by multiple use cases

Extends Indicates that one use case adds or replaces behavior of another Must have a an associated extension point May have a condition

How to prepare right Use cases? Example Chapter 1 - The Context of Systems Analysis And Design Methods

How to prepare right Use cases? Example How is a UML Use Case Diagram different from a traditional flow chart? As mentioned above, UCDs represent functionality in a top-down way, whereas flow charts represent behavior in a linear, time-based way. Also, the way you develop them is all-together different. Example: (This text refers to the diagrams below.) When constructing a UCD, the initial step is to identify all of the top-level behavior. Once you have done this (not a very tricky process) you have already described, at least in a high-level way, all of the things your system knows how to do. You can then continue to add detail by decomposing your use cases into more use cases which are used by the top-level use cases. At every stage of development, though, your UCD is a complete description of the system's functionalty: it may lack detail, but it will not lack feature set elements. And if functionality or behavior is added or deleted over the life of your project, the scope of the change you need to make is proportional to both the scope of the change in the system itself, and the maturity of your model. This is useful because it means that when your model is very young (only high-level diagrams drawn) making sweeping changes to the system does not involve throwing very much work away. A flow chart, however, does not correctly describe the system until you have finished drawing it, and even then small changes in the system will result in significant reworking of your flow charts. In general, UCDs support the process of analysis and design much better than flow charts. How is a UML Use Case Diagram different from a traditional flow chart? As mentioned above, UCDs represent functionality in a top-down way, whereas flow charts represent behavior in a linear, time-based way. Also, the way you develop them is all-together different. Example: (This text refers to the diagrams below.) When constructing a UCD, the initial step is to identify all of the top-level behavior. Once you have done this (not a very tricky process) you have already described, at least in a high-level way, all of the things your system knows how to do. You can then continue to add detail by decomposing your use cases into more use cases which are used by the top-level use cases. At every stage of development, though, your UCD is a complete description of the system's functionalty: it may lack detail, but it will not lack feature set elements. And if functionality or behavior is added or deleted over the life of your project, the scope of the change you need to make is proportional to both the scope of the change in the system itself, and the maturity of your model. This is useful because it means that when your model is very young (only high-level diagrams drawn) making sweeping changes to the system does not involve throwing very much work away. A flow chart, however, does not correctly describe the system until you have finished drawing it, and even then small changes in the system will result in significant reworking of your flow charts. In general, UCDs support the process of analysis and design much better than flow charts. Chapter 1 - The Context of Systems Analysis And Design Methods

Example

Example

How to prepare right Use cases? Example How do you know what to put in the "System" box? The system box only appears on the top-level diagram (remember that a typical UML Use Case description will be composed of many diagrams and sub-diagrams), and should contain use case ovals, one for each top-level service that your system provides to its actors. Any kind of internal behavior that your system may have that is only used by other parts of the system should not appear in the system box. One useful way to think of these top-level services is as follows: if a use case represents a top-level service, then it should make sense for the actors who interact with it to request only that service of your system in a single session (in whatever sense a "session" is intelligible in your system.) Example: In the diagram below we would like to represent the use cases for a camera. Suppose we choose "Open Shutter", "Flash", and "Close Shutter" as the top-level use cases. Certainly these are all behaviors that a camera has, but no photographer would ever pick up their camera, open the shutter, and then put it down, satisfied with their photographic session for the day. The crucial thing to realize is that these behaviors are not done in isolation, but are rather a part of a more high-level use case, "Take Picture". (Note that it does make sense for a photographer to "Take Picture" just once during a session with their camera.) Chapter 1 - The Context of Systems Analysis And Design Methods

How to prepare right Use cases? Example The actors in my diagram have interactions. How do I represent them? If there are interactions between the actors in your system, you cannot represent those interactions on the same diagram as your system. What you can do instead is draw a separate UCD, treating one of the actors itself as a system, and your original system (along with the other actors) as actors on this new diagram. Example: Suppose you wanted to diagram the interactions between a user, a web browser, and the server it contacts. Since you can only have one system on the diagram, you must choose one of the obvious "systems", such as the server. You might then be tempted to draw interaction lines between the actors, but this is a problem because it isn't clear what the interaction means, so it isn't helpful to show it here. A more useful solution would be to draw two diagrams, showing all of the interactions, as below. Chapter 1 - The Context of Systems Analysis And Design Methods

How to prepare right Use cases? Example When do I use the uses arrow? The uses arrow (or uses edge as it would be called in traditional graph thoery) is drawn from a use case X to another use case Y to indicate that the process of doing X always involves doing Y at least once (although it may involve doing it many times, "at least once" is the only relationship guaranteed by this symbol.) This symbol can be referred to as an aggregation operator, because it indicates that a given use case is an aggregate (made up of parts) whose components are the use cases that it uses. If a certain use case uses several others, that means that all of the component use cases must be completed in the process of completing the aggregate use case, although there is no specification in UCDs of the order in which these are completed. A brief, mnemonic way to think about the uses arrow is that it it can be read X uses Y means that "X has a Y" as part of it's behavior. Example: Suppose you wanted to add detail to the diagram shown below, representing an airline reservation system. First, you would create a separate diagram for the top-level services, and then you would add new use cases that make up the top-level ones. There is a uses edge from "Check in Passenger" to "Weigh Luggage" and from "Check in Passenger" to "Assign Seat"; this indicates that in order to Check in a Passenger, Luggage must be Weighed and a Seat must be Assigned. Similarly, the diagram indicates that in order to add a reservation to the system, the available space must be checked and the passenger's information must be recorded. You could imagine breaking these use cases down further to show more detail. Chapter 1 - The Context of Systems Analysis And Design Methods

How to prepare right Use cases? Example When do I use the extends arrow? The extends arrow (or extends edge) is drawn from a use case X to a use case Y to indicate that the process X is a special case behavior of the same type as the more general process Y. You would use this in situations where your system has a number of use cases (processes) that all have some subtasks in common, but each one has something different about it that makes it impossible for you to just lump them all together into the same use case. Example: Suppose you wanted to add detail to the diagram shown below, representing an airline reservation system. Specifically, what you would like to show is that not all of the seats aboard the airplane are exactly alike (some window and some aisle seats), and sometimes passengers will express a preference for one of these types of seats but not the other. But of course, they cannot just be given their preference right away, because the seat they want might not be available. Therefore, the process of assigning a window seat involves checking for the availability of window seats, whereas the process of assigning an aisle seat involves checking for the availability of aisle seats. But even though these processes are different, they are quite similar in a number of other ways, so it doesn't make sense to ignore their similarities. Fortunately, UML lets us have both: we write that assigning these two types of seats are different processes, but they are similar in that both processes extend a common, more general process (assigning seats.) Chapter 1 - The Context of Systems Analysis And Design Methods

How to prepare right Use cases? Example What is the difference between uses and extends? Probably the best way to think about these diagram elements is as follows: - "X uses Y" indicates that the task "X" has a subtask "Y"; that is, in the process of completing task "X", task "Y" will be completed at least once. - "X extends Y" indecates that "X" is a task fo the same type as "Y", but "X" is a special, more specific case of doing "Y". That is, doing X is a lot like doing Y, but X has a few extra processes to it that go above and beyond the things that must be done in order to complete Y. Example:indicates that inorder to successfully "Check-in", you must "Weigh luggage" and "Assign a seat", some number of times, in some order. The key, though, is that all UCs used by a use case MUST BE DONE before that use case be considered to be complete. Once you realize that there are several types of seat assignment, you might be tempted to draw a diagram using the uses edge like the one below, but this doesn't make sense: This diagram says that in order to assign a seat you must assign both a window seat AND an aisle seat to the passenger. Never fear, however; this situation is correctly handled by the extends relationship. Using the extends relationship (as shown in the following diagram), we can express that there are two ways to assign a seat: assigning a window seat and assigning an aisle seat, but only one need be completed in the process of assigning the passenger a seat. Chapter 1 - The Context of Systems Analysis And Design Methods

You are "done" when: You have named all the primary actors and all the user goals with respect to the system. You can captured every trigger condition to the system either as a use case trigger or an extension condition. You have written all the user-goal use cases, along with the summary and subfunction use cases needed to support them. Each use case is clearly enough written that the sponsors agree they will be able to tell whether or not it is actually delivered. the users agree that is what they want or can accept as the system’s behavior. the developers agree they can actually develop that functionality. The sponsors agree that the use case set covers all they want (for now). . . .

Sources http://www.oracle.com/technetwork/testcontent/gettingstartedwithusecasemodeling-133857.pdf http://alistair.cockburn.us/get/2465 http://www.gatherspace.com/static/use_case_example.html http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html http://www.objectmentor.com/resources/articles/usecases.pdf http://www.math-cs.gordon.edu/courses/cs211/ATMExample/UseCases.html