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.

Slides:



Advertisements
Similar presentations
Use Case Diagrams Damian Gordon.
Advertisements

CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Use Case & Use Case Diagram
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Use Case Model. C-S 5462 Use case model describes what the user expects the system to do –functional requirements may describe only the functionalities.
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
Object-Oriented Analysis and Design
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Use-case Modeling.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Use cases and requirement specification - 1 Use case diagrams 3 use cases System boundaries Remember: Use case diagramming is a tool, not the requirements.
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
Use Case Diagram.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
UML CLASS DIAGRAMS. Basics of UML Class Diagrams What is a UML class diagram? Imagine you were given the task of drawing a family tree. The steps you.
USE Case Model.
Project Analysis Course ( ) Week 2 Activities.
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
Chapter 7 Structuring System Process Requirements
Intro: Use Case and Use Case Diagram Documentation.
Interaction Modeling Interaction model describes how objects interact to produce useful results. Interactions can be modeled at different levels of abstraction:
Interaction Modeling. Introduction (1) Third leg of the modeling tripod. It describes interaction within a system. The class model describes the objects.
Chapter 5 – System Modeling
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
Faculty of Computer & Information
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
1 Use Case Diagrams Use Case Actor Use case description Use case realization (Scenario) Use case relationships –Extends –Uses.
1 Structuring Systems Requirements Use Case Description and Diagrams.
CPSC 203. Use Case Diagram  A description of a system’s behavior as it responds to a request that originates from outside of that system. Specifies the.
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.
(c) Addison Wesley Copyright © 2000 by Addison Wesley Version 1.0
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
Week IV in SOS  Tuesday Project Time -- 4:15pm-5pm URL for project(s) due to Judy by Friday 5pm  Friday Paper  OOAD Handouts thru last Thursday (see.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class 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.
Systems Analysis and Design in a Changing World, Fourth Edition
Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
UML - Development Process 1 Software Development Process Using UML.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
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,
Ondřej Přibyl Faculty of Transportation Sciences, CTU DESIGN OF ITS SYSTEMS Project support 1 3 PROJECT SUPPORT Use cases.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
George Wang, Ph.D. COMP 380/L Lesson 2. Use Case Use cases are a way to capture system functionalities (i.e., functional requirements) Based on use case.
Auburn University COMP 2710 Software Construction Use Case Analysis – Examples and Exercises Dr. Xiao Qin Auburn University.
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
Using Use Case Diagrams
Chapter 4: Business Process and Functional Modeling, continued
UML Diagrams By Daniel Damaris Novarianto S..
Structuring System Process Requirements
Use Case Modeling - II Lecture # 27.
Lec-5 : Use Case Diagrams
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Week 12: Activity & Sequence Diagrams
Object Oriented Analysis and Design
Use Case Model Use case diagram – Part 2.
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Use Case Modeling Part of the unified modeling language (U M L)
Information System Design
Presentation transcript:

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 learn about the UML diagrams themselves. In this article, you'll explore the Use case diagram. You will be presented with – the basics of use case diagrams – how to draw a use case diagram. – use case specification – Finally, you'll see how to use case diagrams for the case study application—the Courseware Management System

Basics of Use Case Diagrams The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as "actors" and the processes are called "use cases" The Use case diagram shows which actors interact with each use case. Simply, a use case diagram captures the functional aspects of a system. More specifically, it captures the business processes carried out in the system. Use case diagrams define the requirements of the system being modeled

Elements of a UML Use Case Diagram Take a closer look at what elements constitute a use case diagram: Actors- portrays any entity (or entities) that performs certain roles in a given system. The different roles the actor represents are the actual business roles of users in a given system For example, for modeling a banking application, a customer entity represents an actor in the application. Similarly, the person who provides service at the counter is also an actor. An actor is shown as a stick figure in a use case diagram depicted "outside" the system boundary

Use case- is a visual representation of a distinct business functionality in a system As the first step in identifying use cases, you should list the discrete business functions in your problem statement. Each of these business functions can be classified as a potential use case. A use case is shown as an ellipse in a use case diagram Elements of a UML UCD….

System boundary- defines the scope of what a system will be. A system cannot have infinite functionality. So, it follows that use cases also need to have definitive limits defined. A system boundary of a use case diagram defines the limits of the system. The system boundary is shown as a rectangle spanning all the use cases in the system. Elements of a UML UCD….

Relationships in UML Use Cases UML use cases share different kinds of relationships. A relationship between two use cases is basically a dependency between the two use cases. Defining a relationship between two use cases is the decision of the modeler of the use case diagram. Use case relationships can be one of the following:

Include- When a use case is depicted as using the functionality of another use case in a diagram An include relationship is depicted with a directed arrow having a dotted shaft relationship. The stereotype " >" identifies the relationship as an include relationship Relationships in UCD….. In Figure, the functionality defined by the "Validate patient records" use case is contained within the "Make appointment" use case. Hence, whenever the "Make appointment" use case executes, the business steps defined in the "Validate patient records" use case are also executed.

Extend- relationship between two use cases, the child use case adds to the existing functionality and characteristics of the parent use case. An extend relationship is depicted with a directed arrow having a dotted shaft, similar to the include relationship The stereotype " >" identifies the relationship as an extend relationship. Relationships in UCD….. Figure on the left shows an example of an extend relationship between the "Perform medical tests" (parent) and "Perform Pathological Tests" (child) use cases. The "Perform Pathological Tests" use case enhances the functionality of the "Perform medical tests" use case

Generalizations- a parent-child relationship between use cases. In a use case diagram, generalization is shown as a directed arrow with a triangle arrowhead. The child use case is connected at the base of the arrow. The tip of the arrow is connected to the parent use case. Relationships in UCD….. In the Figure on the left the "Store patient records (paper file)" (parent) use case is depicted as a generalized version of the "Store patient records (computerized file)" (child) use case

Writing a UML Use Case Specification A use case diagram, as we have seen, is a visual depiction of the different scenarios of interaction between an actor and a use case The usefulness of use case diagrams is more as a tool of communication between the requirements capture team and the user group The next step after finalizing of use case diagrams is to document the business functionality into clear-cut and detailed use case specifications Elaborated use case specifications are used as an input for design and development and for writing test cases (unit, system, and regression tests, as the case may be).

A use case specification document should enable us to easily document the business flow Information that you document in a use case specification includes what actors are involved, the steps that the use case performs, business rules, and so forth A use case specification document should cover the following areas: Writing a UML UC Specification…

Actors: List the actors that interact and participate in this use case. Pre-conditions: Pre-conditions that need to be satisfied for the use case to perform. Post-conditions: Define the different states in which you expect the system to be in, after the use case executes. Basic Flow: List the basic events that will occur when this use case is executed. Include all the primary activities that the use case will perform. Alternative flows: Any subsidiary events that can occur in the use case should be listed separately. Each such event should be completed in itself to be listed as an alternative flow. A use case can have as many alternative flows as required. But remember, if there are too many alternative flows, you need to revisit your use case design to make it simpler and, if required, break the use case into smaller discrete units. Special Requirements: Business rules for the basic and alternative flows should be listed as special requirements in the use case narration. These business rules will also be used for writing test cases. Both success and failure scenarios should be described here. Use case relationships: For complex systems, it is recommended that you document the relationships between use cases. If this use case extends from other use cases or includes the functionality of other use cases, these relationships should be listed here. Writing a UML UC Specification…

UML Case study—Courseware Management System We will now design the use case model for the Courseware Management System case study. Analyze the problem statement to identify the potential actors and use cases of the system. First, let us list the potential actors. A quick look at the problem statement shows up the following terms and entities specific to the system: – Courses and Topics that make up a course – Tutors who teach courses – Course administrators who mange the assignment of the courses to tutors – Calendar or Course Schedule is generated as a result of the – Students who refer to the Course schedule or Calendar to decide which courses they wish to take up for study

Identifying Actors of the Courseware Management System The entities that perform action will be the actors for the Courseware Management System. From carefully study of the problem, the actors that we can identify are: – Tutors – Course administrators – Students A primary actor among these is: – Course administrators

Identifying Use Cases of the Courseware Management System Next, let us identify the potential business processes in the Courseware Management System. The primary business flows in the system are: – Manage courses – Manage course assignments We can further divide the above two business flows into sub flows: So, within the "Manage courses" use case, we can identify the following sub processes: – View courses – Manage topics for a course – Manage course information the use cases that we have identified within the "Manage course assignment" use case are: – View course calendar – View tutors – Manage tutor information – Assign courses to tutors

UCD The final list of use cases for the courseware management system will now be: – View courses – Manage topics for a course – Manage course information – View course calendar – View tutors – Manage tutor information – Assign courses to tutors

Example 2: Point of Sell (POS) System in Minimart

POS..

Example 3: ATM Banking System

Sample UC specification- user validation in ATM machines 1 Brief Description This use case describes general behavior for the ATM to validate the user. It includes all steps that are the same no matter what kind of transaction the Bank Customer does. 2 Actors Bank Customer Bank 3 Preconditions There is an active network connection to the Bank. 4 Basic Flow of Events 1. The use case begins when the Bank Customer inserts their Bank Card. 2. The ATM reads the code from the magnetic strip of the Bank Card and checks with the Bank to see if it is an acceptable Bank Card. The Bank confirms the card is valid. 3. The ATM asks for the customer PIN code (4 digits). 4. The Bank Customer enters a PIN. 5. The ATM validates the PIN with the Bank. The Bank confirms the PIN is valid. 6. The ATM displays the different alternatives that are available on this unit. 7. The use case ends. (The flow continues according to the flow of the specific transaction). 5 Alternative Flows 5.1 Not a valid card If in step 2 of the basic flow the card is invalid, then 1. The ATM shall display a "sorry not a valid card" message and return the card. 2. The use case ends with an indication of the failure. 6 Post-conditions 6.1 Successful Completion If the use case ends in success, the user is validated and may continue with the specific transaction. 6.2 Failure Condition If there is a failure to validate the user, the ATM shall log the event including the reason for the failure. 7 Special Requirements The ATM shall keep a log, including date and time, of all complete and incomplete transactions with the Bank.

QUESTIONS