Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.

Slides:



Advertisements
Similar presentations
Writing Good Use Cases - Instructor Notes
Advertisements

OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
Use Case Diagrams.
CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Use Case & Use Case Diagram
Agenda What is a Use Case? Benefits of the Use Cases Use Cases vs. Requirements document Developing the Use Case model System Actor Use Case Use Case.
Analysis and Design with UML
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Use-case Modeling.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 14 Requirements and Specifications. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Software Engineering The implementation.
Software Engineering Recitation 3 Suhit Gupta. Review CVS problems XML problems – XML/XSD/DTD/SCHEMAS.
SwE 313 Case Study Registration System.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Documenting Requirements using Use Case Diagrams
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Use Case Analysis – continued
Page 1 R Copyright © 1997 by Rational Software Corporation Analysis and Design with UML.
USE Case Model.
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Page 1 What is the UML? UML stands for Unified Modeling Language The UML combines the best of the best from – Data Modeling concepts (Entity Relationship.
Use Case Modeling. What is use case modeling? Core concepts Diagram tour When to model use cases Modeling tips Example: Online HR System.
Page 1  Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship via “ Modeling captures essential parts of.
Page 1 R Copyright © 1998 by Rational Software Corporation Visual Modeling and the UML.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Requirements Artifacts Precursor to A & D. Objectives: Requirements Overview  Understand the basic Requirements concepts and how they affect Analysis.
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
REQUIREMENTS CAPTURE 1 ASU Course Registration System Use-case Model Actor.
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
SOFTWARE REQUIREMENTS ANALYSIS (SWRA) Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
1 Objectives  Define key concepts of use-case modeling.  List the benefits of use-case modeling.  Find actors and use cases.  Describe their relationships.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 1: Introduction to Use-Case Modeling.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
1 Structuring Systems Requirements Use Case Description and Diagrams.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Use Case Diagrams.
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Requirements Overview.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
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 Model Use case diagram.
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.
1 The Unified Modeling Language. 2 The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to.
REQUIREMENTS CAPTURE 1 ASU Course Registration System Use-case Model.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
Rational Unified Process Fundamentals Module 3: Disciplines I.
Use Case Model Use case diagram. Relevant Requirements Artifacts Use-Case Model Supplementary Specification Use-Case Specifications... Glossary Actors.
Page 1 R Copyright © 1997 by Rational Software Corporation Analysis and Design with UML Presentation was downloaded (and is available for free) from Rational.
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.
Essentials of Visual Modeling w/ UML Instructor Notes
IST 210 The Rational Unified Process (RUP) and Unified Modeling Language (UML) Todd Bacastow IST 210: Organization of Data.
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.
Page 1  Copyright © 1997 by Rational Software Corporation Putting the UML to Work The ESU University wants to computerize their registration system –
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.
Using Use Case Diagrams
Chapter 5 System modeling
Systems Analysis and Design in a Changing World, 6th Edition
Lec-5 : Use Case Diagrams
Use Case Model Use case diagram.
Use Case Modeling.
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Systems Analysis and Design in a Changing World, 6th Edition
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)
Presentation transcript:

Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology IT Department Software Engineering ESGD & ITGD st Semester 2008/2009 UP Copyrights 2008

Use Cases System Behavior Actors Use Cases Use Case Relationships Use Case Diagrams Activity Diagrams

System Behavior The behavior of the system under development (i.e., what functionality must be provided by the system) A use case model that illustrates the system's intended functions (use cases). A use case is a description of a system's behavior from a user's standpoint. It is valuable for gathering system’s requirements phase, analysis phase, development phase.

Use Case Model Use Case Model illustrates: – The system's intended functions (use cases) – Its surroundings (actors) – Relationships between the use cases and actors (use case diagrams). Use cases is a technique for capturing functional requirements of systems. Ask “what”, “when”, “why” questions

Simple Example Start up Shutdown Operator Generate Reports Order System View Order Status System Boundary

Actors Actors are not part of the system—they represent anyone or anything that must interact with the system. An actor may: – Only input information to the system – Only receive information from the system – Input and receive information to and from the system

Identifying System’s Actors Typically, these actors are found in the problem statement and by conversations with customers and domain experts. The following questions may be used to help identify the actors for a system: – Who is interested in a certain requirement? – Where in the organization is the system used? – Who will benefit from the use of the system?

Identifying System’s Actors (Cont.) – Who will supply the system with this information, use this information, and remove this information? – Who will support and maintain the system? – Does the system use an external resource? – Does one person play several different roles? – Do several people play the same role? – Does the system interact with a legacy system?

UML Notation for an Actor

What Constitutes a "Good" Actor? The first cut at the list of actors for a system is rarely the final list. – For example, is a new student a different actor than a returning student? Suppose you initially say the answer to this question is yes. The next step is to identify how the actor interacts with the system. If the new student uses the system differently than the returning student, they are different actors. If they use the system in the same way, they are the same actor.

Good Actor (Cont.) Another example is the creation of an actor for every role a person may play. This may also be overkill. – The teaching assistant in ESU takes classes and teaches classes. The capabilities needed to select courses to take and to teach are already captured by the identification of functionality needed by the Student and the Professor actors. Therefore, there is no need for a Teaching Assistant actor.

Actors in the ESU Course Registration System An actor is someone or some thing that must interact with the system under development StudentRegistrarProfessorBilling System

Use Cases Use cases model a dialogue between an actor and the system. They represent the functionality provided by the system; that is, what capabilities will be provided to an actor by the system. The collection of use cases for a system constitute all the defined ways the system may be used.

Use Cases (Cont.) The formal definition for a use case is: A use case is a sequence of transactions performed by a system that yields a measurable result of values for a particular actor. A use case defines a goal-oriented set of interactions between external actors and the system under consideration.

Identifying System’s Use Cases What are the tasks of each actor? Will any actor create, store, change, remove, or read information in the system? What use case will create, store, change, remove, or read this information? Will any actor need to inform the system about sudden, external changes? Does any actor need to be informed about certain occurrences in the system? What use cases will support and maintain the system? Can all functional requirements be performed by the use cases?

UML Notation for a Use Case

What Constitutes a "Good" Use Case? The problem is the level of detail found in use cases. How big (or how little) should they be? There is no one, right answer.

Use Cases: Rule of The Thumbs A use case typically represents a major piece of functionality that is complete from beginning to end. A use case must deliver something of value to an actor. A use case must achieve the actor’s goal.

Use Case Details?: ATM Example

Use Case Details?: ESU Example

After Finding System Actors? Now What? The next step is to look at each actor and see how they use the system. This is the initial set of use cases. A use case is a sequence of transactions a system performs that yields an observable result of value to a particular actor. In other words, it is a chunk of functionality.

Use Cases in the ESU Course Registration System A use case is a pattern of behavior the system exhibits – Each use case is a sequence of related transactions performed by an actor and the system in a dialogue Actors are examined to determine their needs – Registrar -- maintain the curriculum – Professor -- request roster – Student -- maintain schedule – Billing System -- receive billing information from registration Maintain ScheduleMaintain CurriculumRequest Course Roster

Use Cases in the ESU Course Registration System Based on these needs, the following use cases have been identified: – Register for courses – Select courses to teach – Request course roster – Maintain course information – Maintain professor information – Maintain student information – Create course catalog

Documenting Use Cases A flow of events document is created for each use cases. It is a textual description of what must happen to achieve the desired functionality of the use case. – Written from an actor point of view Details what the system must provide to the actor when the use cases is executed Typical contents – How the use case starts and ends – Normal flow of events – Alternate flow of events – Exceptional flow of events

Flow of Events (Count.) The flow of events usually contains the following information: – Who starts the use case (I.e. what actor) – How the use case ends – The normal flow (I.e. the happy day scenario -- all works well) – Any identified alternate flows (I.e. What happens when different options are selected) – finally any exceptional flows (the what happens if … scenarios). It is important to start to think about the exceptional flows early in analysis -- this determines what risks will be mitigated by the system since not ALL risks will be taken care of by the software.

Maintain Curriculum Flow of Events This use case begins when the Registrar logs onto the Registration System and enters his/her password. The system verifies that the password is valid (E-1) and prompts the Registrar to select the current semester or a future semester (E-2). The Registrar enters the desired semester. The system prompts the professor to select the desired activity: ADD, DELETE, REVIEW, or QUIT. If the activity selected is ADD, the S-1: Add a Course subflow is performed. If the activity selected is DELETE, the S-2: Delete a Course subflow is performed. If the activity selected is REVIEW, the S-3: Review Curriculum subflow is performed. If the activity selected is QUIT, the use case ends....

Use Case Docs Template 1.0 Use Case Name 1.1 Brief Description 2.0 Flow of Events 2.1 Basic Flow 2.2 Alternate Flows 2.2.x 3.0 Special Requirements 3.x 4.0 Preconditions 4.x 5.0 Post Conditions 5.x 6.0 Extension Points 6.x

Use Case Relationships An association relationship may exist between an actor and a use case. This type of association is often referred to as a communicate association since it represents communication between an actor and a use case. An association may be navigable: – In both directions (actor to use case and use case to actor) – in only one direction (actor to use case or use case to actor).

Use Case Relationships The navigation direction of an association represents who is initiating the communication – the actor is initiating the communication with the use case – the use case is initiating the communication with the actor).

Include Relationship Include relationships are created between the new use case and any other use case that "uses" its functionality. An include relationship is drawn as a dependency relationship that points from the base use case to the used use case.

Extend relationship An extend relationship is used to show: – Optional behavior – Behavior that is run only under certain conditions such as triggering an alarm – Several different flows that may be run based on actor selection

Communicate, Include, and Extend relationships

Use Case Diagrams Describe what the system does from the view of an external observer. Use cases represent scenarios of what could happen to the system. A Use Case is a summary of a scenario of some related tasks A use case diagram is a graphical view of some or all of the actors, use cases, and their interactions identified for a system.

Use Case Diagrams Each system typically has a Main Use Case diagram, which is a picture of the system boundary (actors) and the major functionality provided by the system (use cases). Other use case diagrams may be created as needed. Some examples follow: – A diagram showing all the use cases for a selected actor – A diagram showing all the use cases being implemented in an iteration – A diagram showing a use case and all its relationships

The Use Case toolbar in Rational Rose Package Use Case Actor Message Dependency Generalization

Use Case Diagram in the ESU Course Registration System Registrar Professor Maintain Schedule Maintain Curriculum Request Course Roster Student Billing System

Use Case Diagram in the ESU Course Registration System

Use Case: Clinic System Example A Use Case diagram is a summary of Use Cases

Use Case: Clinic System Example

Use Case diagrams show the system boundaries. Generalization: one is a special kind of the other Includes: one invokes the other Extend: one is a variation of the other

Activity Diagram Activity diagrams show flow of control Select courses to teach Create curriculum Create catalog Place catalog in bookstore Open registration Close registration [ Registration time period expired ] Mail catalog to students

Swimlanes RegistrarProfessor Select courses to teach Create curriculum Create catalog Place catalog in bookstore Open registration Close registration [ Registration time period expired ] Mail catalog to students