Requirements – Scenarios and Use Cases

Slides:



Advertisements
Similar presentations
Karolina Muszyńska Based on:
Advertisements

MIS 325 PSCJ. 2  Business processes can be quite complex  Process model: any abstract representation of a process  Process-modeling tools provide a.
Requirements Engineering n Elicit requirements from customer  Information and control needs, product function and behavior, overall product performance,
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Conversation Form l One path through a use case that emphasizes interactions between an actor and the system l Can show optional and repeated actions l.
Introduction To System Analysis and Design
Use-case Modeling.
CAP 252 Lecture Topic: Requirement Analysis Class Exercise: Use Cases.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Chapter 14 Requirements and Specifications. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Software Engineering The implementation.
CS 5150 Software Engineering
1 CS 501 Spring 2005 CS 501: Software Engineering Lecture 8 Requirements II.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Documenting Requirements using Use Case Diagrams
1 CS 501 Spring 2008 CS 501: Software Engineering Lecture 9 Requirements II.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Overview of Software Requirements
CS 5150 Software Engineering
SYSTEMS ANALYSIS. Chapter Five Systems Analysis Define systems analysis Describe the preliminary investigation, problem analysis, requirements analysis,
Chapter 7: The Object-Oriented Approach to Requirements
USE Case Model.
CMPT 275 Software Engineering
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Chapter 5 – System Modeling
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Requirements Analysis
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Requirements Engineering Processes l Processes used to discover, analyse and.
Interaction Modeling Interaction model describes how objects interact to produce useful results. Interactions can be modeled at different levels of abstraction:
Requirements Engineering Requirements Elicitation Process Lecture-8.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
Chapter 7 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
® 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.
Systems Analysis and Design in a Changing World, 6th 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.
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.
CS CS 5150 Software Engineering Lecture 9 Requirements 2.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Week04 Project Requirements.
UML - Development Process 1 Software Development Process Using UML.
1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 8 Requirements II.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
CS 5150 Software Engineering Lecture 8 Requirements 2.
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Chapter 5 – System Modeling
CS 501: Software Engineering
CompSci 280 S Introduction to Software Development
Systems Analysis and Design in a Changing World, Fourth Edition
Exam 0 review CS 360 Lecture 8.
Chapter 5 – System Modeling
UML Use Case Diagrams.
Requirements – Scenarios and Use Cases
IMPORTANT NOTICE TO STUDENTS:
Object Oriented Analysis and Design
CS310 Software Engineering Dr.Doaa Sami
Software Design Lecture : 15.
Seminar 2 Design of Informatics Systems
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Scenario & use cases.
CS 5150 Software Engineering
Presentation transcript:

Requirements – Scenarios and Use Cases CS 360 Lecture 6

System modeling System modeling is the process of developing abstract models of a project with each model presenting a different view or perspective of that project. It has now come to mean representing a system using some kind of graphical notation almost always based on Unified Modeling Language (UML). System modelling Helps the analyst understand system functionality. Used to communicate with customers.

Existing and planned system models Models of the existing system are used during RE. They help clarify the existing system including strengths and weaknesses. These then lead to requirements for the new system. Models of the new system are used during RE to help explain the proposed requirements. Developers use these models to discuss design proposals and begin documentation. In a model-driven process, it is possible to generate a complete or partial prototype from the system model.

UML diagram types Activity diagrams Use case diagrams Shows the activities involved in a process or in data processing. Use case diagrams Shows the interactions between a system and its environment. Sequence diagrams Shows interactions between actors and the system and between system components. Class diagrams Shows the object classes in the system and the associations between these classes. State diagrams Shows how the system reacts to internal and external events.

Use of graphical models Means of discussion about an existing or proposed system Incomplete models are OK as their role is to support discussion. Model revision is generally necessary throughout the project. A way of documenting an existing system Models should be an accurate representation of the system but need not be complete. Creates a detailed description that can be used to build the system

System boundaries model (documentation) System boundaries are established to define what the system should and should not do. Shows other systems that are used or depends on the system being developed. Identifies where the system begins and ends. Ex: System scalability (20 node cloud vs. 200 node cloud) UAV drone system for surveying a specific geographical region Defining system boundaries Physical boundaries – infrastructure, geographical Social boundaries – religions, traditions, behavioral change Economic boundaries – allocation of limited resources, benefits to society Political boundaries – community concern, legal issues, personal rights

Scenarios A scenario is a scene that illustrates some interaction with a proposed system. User logging into website Robot making decisions based on environment A scenario is a tool used during requirements analysis to describe a specific use of a proposed system. Captures system use, based on a viewpoint, by using specific examples.

Describing a Scenario Some organizations have complex documentation standards for describing a scenario. At the very least, the description should include: A statement of purpose of the scenario The individual user or transaction that is being followed Assumptions and/or features about hardware/software The steps of the scenario

Developing a scenario with the client (Documentation) Example of how to develop a scenario: The requirements are being developed for a system that will enable university students to take online exams from home. Create a scenario for how a typical student interacts with the exam system. In the next few slides, the questions in blue are typical of the questions to ask the client while developing the scenario.

Developing a scenario with the client: a typical student Purpose: Scenario that describes the use of an online Exam system by a representative student Individual: [Who is a typical student?] Student A, junior at WKU, major in computer science. [Where can the student be located?] Equipment: Any computer with a supported browser. [Is there a list of supported browsers? Are there any network restrictions?] Scenario: Student A authenticates. [How does a WKU student authenticate?] Student A starts browser and types URL of Exam system. [How does the student know the URL?] Exam system displays list of options. [Is the list tailored to the individual user?]

Developing a scenario with the client: a typical student (continued) Student A selects CS 221 Exam 1. A list of questions is displayed, each marked to indicate whether completed or not. [Can the questions be answered in any order?] Student A selects a question and chooses whether to submit a new answer or edit a previous answer. [Is it always possible to edit a previous answer? Are there other options?] [What types of question are there: text, multiple choice, etc.?] The first question requires a written answer. Student A is submitting a new answer. The student has a choice whether to type the solution into the browser or to attach a separate file. Student A decides to attach a file. [What types of file are accepted?]

Developing a scenario with the client: a typical student (continued) For the second question, the student chooses to edit a previous answer. Student A chooses to delete a solution previously typed into the browser, and to replace it with an attached file. [Can the student edit a previous answer, or must it always be replaced with a new answer?] As an alternative to completing the entire exam in a single session, Student A decides to saves the completed questions work to continue later. [Is this always permitted?] Student A logs off. Later Student A log in, finishes the exam, submits the answers, and logs out. [Is this process any different from the initial work on this exam?] The Student A has now completed the exam. The student selects an option that submits the exam to the grading system. [What if the student has not attempted every question? Is the grader notified?]

Developing a scenario with the client: a typical student (continued) Student A now wishes to change a solution. The system does not permit changes once the solution has been submitted. [Can the student still see the solutions?] Later Student A logins in to check the grades. [When are grades made available? How does the student know?] Student A requests a regrade. [What are the policies? What are the procedures?]

Developing a scenario with the client: (continued) Developing a scenario with a client clarifies many functional and non-functional requirements. The scenario will often clarify the requirements for functionality Design of functionalities should not be part of the scenario. Scenarios should demonstrate functionality, not define how the functionality is accomplished. Although this scenario is quite simple, many details have been left out.

Scenarios for analyzing special requirements Scenarios are very useful for analyzing special requirements. Examples Reversals In a financial system, a transaction is credited to the wrong account. What sequence of steps are used to reverse the transaction? Errors A mail order company has several copies of its inventory database. What happens if they become inconsistent? Scenarios for error recovery Murphy's Law: "If anything can go wrong, it will". Create a scenario for everything that can go wrong and how the system is expected to handle it.

Modeling scenarios as use cases Models Scenarios are useful in discussing a proposed system with a client, but requirements need to be made more precise before a system is fully understood. This is the purpose of requirements modeling. A use case provides such a model. There is a good discussion of use cases in Wikipedia. https://en.wikipedia.org/wiki/Use_case

Two simple use cases (documentation)

Actor and use case diagram An actor is a user of a system in a particular role. Can be human or an external system. A use case is a task that an actor needs to perform with the help of the system

Use cases and actors Actor is a role, not an individual Ex: librarian can have many roles An actor must be a beneficiary of the use case Person who borrows a book not the librarian who processes book when borrowed While naming actors, choose names that describe the role, not generic names, such as "user" or "client".

Use cases for exam system

Describing a use case Some organizations have complex documentation standards for describing a use case. At the very least, the description should include: The name of the use case, which should summarize its purpose The actor or actors The flow of events Assumptions about entry conditions

Outline of take exam use case (documentation) Name of Use Case: Take Exam Actor(s): ExamTaker Flow of events: ExamTaker connects to the Exam server. Exam server checks whether ExamTaker is already authenticated and runs authentication process if necessary. ExamTaker selects a exam from a list of options. ExamTaker repeatedly selects a question and either types in a solution, attaches a file with a solution, edits a solution or attaches a replacement file.

Outline of take exam use case (continued) Flow of events (continued): ExamTaker either submits completed exam or saves current state. When a completed exam is submitted, Exam server authenticates. ExamTaker logs out. Entry conditions: ExamTaker must have authentication credentials. Computing requirements: supported browser.

Use cases for exam system (continued) Note that actor is a role. An individual can be an ExamTaker on one occasion and an Instructor at a different time.

Relationships between use cases: <<includes>> The Authenticate use case may be used in many contexts <<includes>> is used for use cases that are in the normal flow of events of the main use case.

Relationships between use cases: <<extends>> <<extends>> is used for exceptional conditions, especially those that can occur at any time.

Scenarios and use cases in the development cycle Scenarios and use cases are both intuitive -- easy to discuss with clients Scenarios are a tool for requirements analysis. They are useful to validate use cases and in checking the design of a system. They can be used as test cases for acceptance testing. Use cases are a tool for modeling requirements. A set of use cases can provide a framework for the requirements specification.

Use cases with several actors This restaurant example is based on a use case diagram from Wikipedia.

Use case Diagrams Use case diagrams A use case diagram shows the rela1onships between actors and their interactions with a system. It does not show the logic of those interactions.

Team/client meeting Groups should be prepared with: Progress since last meeting Outline of weekly and milestone goals Who’s working on which tasks? When is the team meeting? Problems? Requirements documentation questions as specified in the course notes. Designs, architectures, mock-up, diagrams, etc. Feedback on feasibility report and presentation will be given back during the meeting.