Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS 5150 Software Engineering 7. Scenarios and Use Cases, Study notes of Software Engineering

CS 5150 Software Engineering ... Purpose: Scenario that describes the use of an online Exam system by a ... [How does a Cornell student authenficate?]

Typology: Study notes

2022/2023

Uploaded on 05/11/2023

lana87
lana87 🇺🇸

4.4

(17)

58 documents

1 / 31

Toggle sidebar

Related documents


Partial preview of the text

Download CS 5150 Software Engineering 7. Scenarios and Use Cases and more Study notes Software Engineering in PDF only on Docsity! Cornell University Computing and Information Science CS 5150 Software Engineering 7. Scenarios and Use Cases William Y. Arms Scenarios Scenario A scenario is a scene that illustrates some interac?on with a proposed system. A scenario is a tool used during requirements analysis to describe a specific use of a proposed system. Scenarios capture the system, as viewed from the outside, e.g., by a user, using specific examples. Note on terminology Some authors restrict the word "scenario" to refer to a user's total interac?on with the system. Other authors use the word "scenario" to refer to parts of the interac?on. In this course, the term is used with both meanings. Developing a Scenario with a Client Example of how to develop a scenario with a client The requirements are being developed for a system that will enable university students to take exams online from their own rooms using a web browser. Create a scenario for how a typical student interacts with the system. In the next few slides, the ques7ons in blue are typical of the ques7ons to ask the client while developing the scenario. Developing a Scenario with a Client: a Typical Student Purpose: Scenario that describes the use of an online Exam system by a representa?ve student Individual: [Who is a typical student?] Student A, senior at Cornell, major in computer science. [Where can the student be located? Do other universi7es differ?] Equipment: Any computer with a supported browser. [Is there a list of supported browsers? Are there any network restric7ons?] Scenario: 1. Student A authen?cates. [How does a Cornell student authen7cate?] 2. Student A starts browser and types URL of Exam system. [How does the student know the URL?] 3. Exam system displays list of op?ons. [Is the list tailored to the individual user?] 4. Student A selects CS 1234 Exam 1. 5. A list of ques?ons is displayed, each marked to indicate whether completed or not. [Can the ques7ons be answered in any order?] 6. Student A selects a ques?on 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 op7ons?] 7. [What types of ques7on are there: text, mul7ple choice, etc.?] The first ques?on requires a wri[en answer. Student A is submi\ng a new answer. The student has a choice whether to type the solu?on into the browser or to a[ach a separate file. Student A decides to a[ach a file. [What types of file are accepted?] Developing a Scenario with a Client (continued) Scenarios for Analyzing Special Requirements Scenarios are very useful for analyzing special requirements. Examples • Reversals. In a financial system, a transac?on is credited to the wrong account. What sequence of steps are used to reverse the transac?on? • Errors. A mail order company has several copies of its inventory database. What happens if they become inconsistent? • Malfeasance. In a vo?ng system, a voter has houses in two ci?es. What happens if he a[empts to vote in both of them? 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. The approach used in this course is less complex than the Wikipedia ar7cle. Two Simple Use Cases 12 Borrow Book BookBorrower Record Pressure PressureSensor Use Cases for Exam System Take Exam ExamTaker Check Grades Request RegradeThree separate use cases Use Cases for Exam System (con?nued) Set Exam Instructor Grade Regrade Note that actor is a role. An individual can be an ExamTaker on one occasion and an Instructor at a different time. Describing a Use Case Some organizations have complex documentation standards. Metadata • The name of the use case • Goal of the use case • The actor or actors • Trigger • Entry conditions at beginning • Post conditions at end Flow of events • The basic flow of events • Alternate flows of events • Exceptions Take Exam Use Case: Alternate Flow Alternate flows and exceptions model paths through the use case other than the basic flow. In the following list, each flow is linked to a step of the basic flow. Alternate flows are alternative paths to successful completion of the use case. 3. ExamTaker has previously entered part of the exam, but not submitted it. 4. Solution file not accepted by system. 6. Incomplete submission. Exceptions lead to failure of the use case. 2. Authentication failure The <<extends>> Relationship The «extends» relationship Uses cases can make use of other use cases If an alternate flow or an exception needs extra detail, it can be modeled as a separate use case using the «extends» relationship. 21 Relationships Between Use Cases: <<extends>> Take ExamExamTaker Incomplete Submission <<extends>> Authentication Fails<<extends>> Scenarios and Use Cases in the Development Cycle Scenarios and use cases are both intui?ve -- 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 tes?ng. Use cases are a tool for modeling requirements. • A set of use cases can provide a framework for the requirements specifica?on. • Use cases are the basis for system and program design, but are oQen hard to translate into class models. Use Cases with Several Actors This restaurant example is based on a use case diagram from Wikipedia. Waiter Diner Cashier Chef Order Food Serve Food Eat Food Pay for Food Order Wine Cook Food <<extends>> Use Case Diagrams 27 Use case diagrams A use case diagram shows the relaFonships between actors and and their interac?ons with a system. It does not show the logic of those interac?ons. An Old Examina?on Ques?on Wrong solution SearchMenu PaybyCredit <<includes>> IdentifyCustomer <<includes>> AddtoCart Pay Shopper Cornell University CompuFng and InformaFon Science CS 5150 SoQware Engineering 7. Scenarios and Use Cases End of Lecture
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved