Download presentation
Presentation is loading. Please wait.
1
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling
2
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 2 Can you develop this?
3
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 3 Types of Scenarios As-is scenario: Used in describing a current situation. Usually used during re- engineering. The user describes the system. Visionary scenario: Used to describe a future system. Can often not be done by the user or developer alone Evaluation scenario: User tasks against which the system is to be evaluated Training scenario: Step by step instructions designed to guide a novice user through a system
4
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 4 What is This?
5
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 5 Possible Object Model: Eskimo Eskimo Size Dress() Smile() Sleep() Shoe Size Color Type Wear() Cave lighting entrance enter() leave() livesIn * Coat Size Color Type Wear()
6
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 6 Alternative: Head Head Hair Dress() Smile() Sleep() Face Nose smile() close_eye() Mouth Teeth Size open() speak() Ear Size listen() *
7
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 7 The Artist’s View Picture of Sculpture Picture Picture of Eskimo View 1View 2 MouthEyes Nose JacketHands Legs
8
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 8 System & Object identification System development is not just taking a picture of a domain 2 important problems during requirements analysis: Identify objects Define the system’s purpose Depending on the system’s purpose, different objects are found What object is inside, what object is outside? How can we identify the purpose of a system? Scenarios Use cases: Abstractions of scenarios
9
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 9 Why Scenarios & Use Cases? Comprehensible by the user Use cases [should] model a system from the users’ point of view Define every possible event flow through the system Description of interaction between objects Use cases form basis for whole development process User manual System design & object design Implementation Test specification Client acceptance test An excellent basis for incremental & iterative development
10
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 10 How do we find scenarios? Don’t expect the client to be verbal if the system does not exist Don’t wait for information even if the system exists Engage in a dialogue (evolutionary, incremental) You help the client to formulate the requirements The client helps you to understand the requirements The requirements evolve while the scenarios are being developed
11
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 11 Example: Accident Management System What needs to be done to report a “Cat in a Tree” incident? What needs to be done if a person reports “Warehouse on Fire?” Who is involved in reporting an incident? What does the system do if: No police cars are available? The police car has an accident on the way to the “cat in a tree” incident? What needs to be done if the “Cat in the Tree” turns into a “Grandma has fallen from the Ladder”? Can the system cope with a simultaneous incident report “Warehouse on Fire?”
12
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 12 Scenario Example: Warehouse on Fire Bob, driving down main street in his patrol car notices smoke coming out of a warehouse. His partner, Alice, reports the emergency from her car. Alice enters the address of the building, a brief description of its location (i.e., north west corner), & an emergency level. In addition to a fire unit, she requests several paramedic units on the scene given that area appear to be relatively busy. She confirms her input & waits for an acknowledgment. John, the Dispatcher, is alerted to the emergency by a beep of his workstation. He reviews the information submitted by Alice & acks the report. He allocates a fire unit & 2 paramedic units to the Incident site & sends their estimated arrival time (ETA) to Alice. Alice received the ack & the ETA.
13
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 13 Observations about Warehouse on Fire Scenario Concrete scenario Describes 1 instance of reporting a fire incident. Does not describe all possible situations in which a fire can be reported. Participating actors Bob, Alice and John
14
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 14 Next goal, after the scenarios are formulated: Find a use case in the scenario that specifies all possible instances of how to report a fire Example: “Report Emergency “ in the first paragraph of the scenario is a candidate for a use case Describe this use case in more detail Describe the entry condition Describe the flow of events Describe the exit condition Describe exceptions Describe special requirements (constraints, nonfunctional requirements)
15
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 15 Example of steps in formulating a use case Name the use case Use case name: ReportEmergency Find the actors Generalize the concrete names (“Bob”) to actors (“Field officer”) Participating Actors: Field Officer (Bob and Alice in the Scenario) Dispatcher (John in the Scenario) Identify the flow of events Use informal natural language
16
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 16 Example of steps in formulating a use case Formulate the Flow of Events: The FieldOfficer activates the “Report Emergency” function on her terminal. FRIEND responds by presenting a form to the officer. The FieldOfficer fills the form, by selecting the emergency level, type, location, & brief description of the situation. The FieldOfficer also describes possible responses to the emergency situation. Once the form is completed, the FieldOfficer submits the form, at which point, the Dispatcher is notified. The Dispatcher reviews the submitted information & creates an Incident in the database by invoking the OpenIncident use case. The Dispatcher selects a response & acks the emergency report. The FieldOfficer receives the ack & the selected response.
17
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 17 Example of steps in formulating a use case Write down the exceptions: The FieldOfficer is notified immediately if the connection between her terminal & the central is lost. The Dispatcher is notified immediately if the connection between any logged in FieldOfficer & the central is lost. Identify & write down any special requirements: The FieldOfficer’s report is ack’d within 30 seconds. The selected response arrives no later than 30 seconds after it is sent by the Dispatcher.
18
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 18 How to Specify a Use Case (Summary) Name the Use Case Actors Describe the actors involved Entry condition Flow of Events Free form, informal natural language Exit condition Exceptions Describe what happens if things go wrong Special Requirements List nonfunctional requirements & constraints
19
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 19 Use Case Model for Incident Management ReportEmergency FieldOfficer Dispatcher OpenIncident AllocateResources
20
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 20 Use Case Associations Use case association relates use cases Types: Extends A use case extends another use case Include A use case uses another use case (“functional decomposition”) Generalization An abstract use case has different specializations
21
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 21 >: Functional Decomposition Problem: A function in the original problem is too complex Solution: Describe the function as the aggregation of simpler functions. Decompose the use case CreateDocument Scan OCR Check >
22
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 22 >: Reuse of Existing Functionality Problem: How can we reuse existing functions? Example Solution: The use case “ViewMap” describes behavior that can be used by the use case “OpenIncident” (“ViewMap” is factored out) ViewMap OpenIncident AllocateResources > Base Use Case Supplier Use Case
23
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 23 ReportEmergency FieldOfficer Help > > Association for Use Cases Problem: The functionality of the problem needs to be extended. Solution: An extend association from a use case A to a use case B indicates that use case B is an extension of use case A. Example: The use case “ReportEmergency” is complete by itself But can be extended by the use case “Help” for a specific scenario in which the user requires help
24
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 24 ValidateUser CheckPassword CheckFingerprint Parent Case Child Use Case Generalization association in use cases Problem: There is common behavior among use cases. Solution: Generalization among use cases factors out common behavior. The child use cases inherit the behavior & meaning of the parent use case & adds or overrides some behavior. Example: In the use case “ValidateUser”, customer requires 2 realizations: “CheckPassword” & “CheckFingerprint”
25
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 25 How do I find use cases? Select a narrow vertical slice of the system: 1 scenario Discuss it in detail with the user. Understand the user’s preferred style of interaction Select a horizontal slice (many scenarios) to define the scope of the system. Discuss the scope with the user Use mock-ups as visual support Find out what the user does Task observation (Good) Questionnaires (Bad)
26
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 26 From Use Cases to Objects Top Level Use Case Level 2 Use Cases Level 3 Use Cases Operations Participating Objects Lev el 2 Lev el 1 Lev el 2 Lev el 3 Lev el 3 Lev el 4 Lev el 4 Lev el 3 AB
27
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 27 Finding Participating Objects in Use Cases For each use case identify Terms that developers/users use to clarify the flow of events Always start with the user’s terms, then negotiate: –FieldOfficer, StationBoundary, or FieldOfficerStation? –IncidentBoundary or IncidentForm? –EOPControl or EOP? Real world entities that the system tracks. Examples: FieldOfficer, Dispatcher, Resource Real world procedures that the system tracks. Example: EmergencyOperationsPlan Data sources or sinks. Example: Printer Interface artifacts. Example: PoliceStation Nouns that are used a lot in general.
28
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 28 Summary The requirements elicitation activities aimed at defining the boundary of the system: Identify Scenarios Identify Use Cases Refine Use Cases Identify participating objects Elicit requirements is to build a functional model of the system This is used in analysis to build an object model & a dynamic model.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.