60-322 Object-Oriented Analysis and Design Jan 14, 2009.

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design Evolutionary Requirements.
Advertisements

© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Object Design Examples with GRASP
Chapter 7 Other Requirements Good Fast Cheap Pick any two. 1CS John Cole.
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
Writing Use Cases: Requirements in Context
Use cases.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
COMP 350: Object Oriented Analysis and Design Lecture 3 Case Studies, Inception & Use Cases References: Craig Larman Chapters 3-6.
Drawing System Sequence Diagrams
CAP 252 Lecture Topic: Requirement Analysis Class Exercise: Use Cases.
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” - may be of.
Fall 2009ACS-3913 Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
Understanding Requirements
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
1 Lecture 1: Processes, Requirements, and Use Cases.
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
Object-Oriented Analysis and Design
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Use cases: deciding what you want.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
This section has been adapted from Dr. Scott Fleming of U. Memphis Details about Use Cases.
The first step in getting what you want is to decide what you want.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Use-Case Model: Writing Requirements in Context
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
1 © 2005 course technology University Of Palestine Chapter 6 Storyboarding the User’s Experience.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
© 2005 course technology1 1 1 University Of Palestine UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
Software Architecture in Practice Architectural description (The reduced version)
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
Inception Is there a project in there? What’s the vision, scope & business case?
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Jan 7, A UP project organizes the work and iterations across four major phases: – Inception -- approximate vision, business case, scope, vague estimates.
 Development is organized in a series of short, fixed-length mini-projects called iterations  Iterations are also incremental  Successive enlargement.
OOSE Use Case. Requirement Functional: –Features, capabilities, and security Non Functional: –Usability: Human factors, help, and documentation –Reliability:
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Requirements Capture. Four Steps of requirements capture List candidate requirements Understand system context Capture functional requirements Capture.
Chapter 9 Applying UML and Patterns -Craig Larman
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
Goals and Scope of a Use Case
OO Methodology Inception Phase.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Software Engineering 1 Object-oriented Analysis and Design Chap 24 Iteration 2 More Patterns.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
PRESENTATION ON USE CASE. Use Case Modeling Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is.
Chapter 6: Use Cases.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
Understanding Requirements
UML - Development Process 1 Software Development Process Using UML.
Larman chapter 61 Use cases Larman chapter 6. 2 Fig. 6.1.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Elaboration popo.
Writing Use Cases.
Relating Use Cases popo.
Use Case Modeling.
Software Requirements
Other System Requirements
Use cases Dr. X.
Presentation transcript:

Object-Oriented Analysis and Design Jan 14, 2009

Jan 14, From last lecture…. Inception is the initial short step to establish a common vision and basic scope for the project. The purpose of the inception phase is not to define all the requirements. It is to decide if the project is worth a serious investigation (during elaboration), not to do that investigation. One of the best practices of UP is manage requirements, which means – a systematic approach to finding, documenting, organizing, and tracking the changing requirements of a system. In the UP, requirements are categorized according to the FURPS+ model. Use FURPS+ model as a checklist for requirements coverage.

Jan 14, Objectives – Identify and write use cases. – Use the brief, casual, and fully dressed formats, in an essential style. – Apply tests to identify suitable use cases. – Relate use case analysis to iterative development. Chapter 6 Use Cases

Jan 14, So what are use cases? Simple, use cases are text stories. It influences many aspects of a project, for example, the OOAD. It is the input of many other subsequent artifacts. We will study how to write use cases, how to draw UML use case diagram. Also a lot of guidelines for writing use cases. Chapter 6 Use cases

Jan 14,

6 Chapter 6 Use Cases Informally, use cases are text stories of some actor using a system to meet goals. Here is an example brief format use case: Process Sale: A customer arrives at a checkout with items to purchase. The cashier uses the POS system to record each purchased item. The system presents a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer receives a receipt from the system and then leaves with the items.

Jan 14, Chapter 6 Use Cases The essence of use cases is discovering and recording functional requirements by writing stories of using a system to fulfill user goals; that is, cases of use.. Use cases are not diagrams, they are text. UML use case diagram is only secondary. Use cases are text stories of some actor using a system to meet goals.

Jan 14, Chapter 6 Use Cases An actor is something with behavior, such as a person (identified by role), computer system, or organization; for example, a cashier. A scenario is a specific sequence of actions and interactions between actors and the system; it is also called a use case instance. It is one particular story of using a system, or one path through the use case. For example, the scenario of successfully purchasing items with cash, or the scenario of failing to purchase items because of a credit payment denial.

Jan 14, Chapter 6 Use Cases A use case is a collection of related success and failure scenarios that describe an actor using a system to support a goal. For example, here is a casual format use case with alternate scenarios: Handle Returns Main Success Scenario: – A customer arrives at a checkout with items to return. The cashier uses the POS system to record each returned item … Alternate Scenarios: – If the customer paid by credit, and the reimbursement transaction to their credit account is rejected, inform the customer and pay them with cash. – If the item identifier is not found in the system, notify the Cashier and suggest manual entry of the identifier code (perhaps it is corrupted). – If the system detects failure to communicate with the external accounting system, …

Jan 14, Chapter 6 Use Cases Another more sensible definition of use cases: – A set of use-case instances, where each instance is a sequence of actions a system performs that yields an observable result of value to a particular actor. Use cases Vs Use -case model – Use–case model is an artifact in the Requirements discipline in UP. – Basically, use-case model is a collection of all written use cases. – It defines the system’s functionality.

Jan 14, Chapter 6 Use Cases KEEP IN MIND: – Use cases are text documents, not diagrams, and use-case modeling is primarily an act of writing text, not drawing diagrams. – Besides use cases, there are other artifacts in requirements, such as, the Supplementary Specification, Glossary, Vision, and Business Rules. These are all useful for requirements analysis. They will be discussed in Ch. 7. – The Use-Case Model may optionally include a UML use case diagram to show the names of use cases and actors, and their relationships.

Jan 14, Chapter 6 Use Cases Why use case is popular: – Easy for customers to contribute to the project – Lower the risk of project failure. – Emphasize the user goals and perspective. – Ability to scale both up and down in terms of sophistication and formality.

Jan 14, Use Cases vs. functional requirements Use cases are mostly functional or behavioural requirements which indicates what the system will do. Another view to look at use cases is that a use case defined a contract of how a system will behave.

Jan 14, Use Cases vs. functional requirements To be clear: Use cases are indeed requirements (although not all requirements). Some think of requirements only as "the system shall do…" function or feature lists. Not so, and a key idea of use cases is to (usually) reduce the importance or use of detailed old-style feature lists and rather write use cases for the functional requirements.

Jan 14, Three kinds of actors An actor is anything with behavior, including the system under discussion (SuD) itself when it calls upon the services of other systems. Primary and supporting actors will appear in the action steps of the use case text. Actors are roles played not only by people, but by organizations, software, and machines. There are three kinds of external actors in relation to the SuD:

Jan 14, Three kinds of actors Primary actor – has user goals fulfilled through using services of the SuD. For example, the cashier. – Why identify? To find user goals, which drive the use cases. Supporting actor – provides a service (for example, information) to the SuD. The automated payment authorization service is an example. Often a computer system, but could be an organization or person. – Why identify? To clarify external interfaces and protocols. Offstage actor – has an interest in the behavior of the use case, but is not primary or supporting; for example, a government tax agency. – Why identify? To ensure that all necessary interests are identified and satisfied. Offstage actor interests are sometimes subtle or easy to miss unless these actors are explicitly named.

Jan 14, Three common use case formats brief – Terse one-paragraph summary, usually of the main success scenario. The prior Process Sale example was brief. – Process Sale: A customer arrives at a checkout with items to purchase. The cashier uses the POS system to record each purchased item. The system presents a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer receives a receipt from the system and then leaves with the items – `. – When? During early requirements analysis, to get a quick sense of subject and scope. May take only a few minutes to create.

Jan 14, Three common use case formats Causal – Informal paragraph format. Multiple paragraphs that cover various scenarios. The prior Handle Returns example was casual. – Handle Returns – Main Success Scenario: A customer arrives at a checkout with items to return. The cashier uses the POS system to record each returned item … – Alternate Scenarios: If the customer paid by credit, and the reimbursement transaction to their credit account is rejected, inform the customer and pay them with cash. If the item identifier is not found in the system, notify the Cashier and suggest manual entry of the identifier code (perhaps it is corrupted). If the system detects failure to communicate with the external accounting system, … When? During early requirements analysis, to get a quick sense of subject and scope. May take only a few minutes to create.

Jan 14, Three common use case formats Fully dressed – All steps and variations are written in detail, and there are supporting sections, such as preconditions and success guarantees. – Example to be seen shortly. – When? After many use cases have been identified and written in a brief format, then during the first requirements workshop a few (such as 10%) of the architecturally significant and high-value use cases are written in detail.

Jan 14, The Template of Fully dressed format Major sections

Jan 14, A Real Use Case in Fully dressed ormat Click meUU

Jan 14, Fully Dressed Format Explained Scope – The scope bounds the system (or systems) under design. Typically, a use case describes use of one software (or hardware plus software) system; in this case it is known as a system use case.

Jan 14, Fully Dressed Format Explained Level – Use cases are classified as at the user-goal level or the subfunction level, among others. – A user-goal level use case is the common kind that describe the scenarios to fulfill the goals of a primary actor to get work done – A subfunction-level use case describes substeps required to support a user goal, and is usually created to factor out duplicate substeps shared by several regular use cases (to avoid duplicating common text). – An example is the subfunction use case Pay by Credit, which could be shared by many regular use cases.

Jan 14, Fully Dressed Format Explained Primary Actor – The principal actor that calls upon system services to fulfill a goal.

Jan 14, Fully Dressed Format Explained Stakeholders and Interests List---Important! – The [system] operates a contract between stakeholders, with the use cases detailing the behavioral parts of that contract…The use case, as the contract for behavior, captures all and only the behaviors related to satisfying the stakeholders' interests. – The stakeholder interest viewpoint provides a thorough and methodical procedure for discovering and recording all the required behaviors.

Jan 14, Fully Dressed Format Explained Preconditions and Success Guarantees (Postconditions) – Preconditions state what must always be true before a scenario is begun in the use case. Preconditions – Preconditions communicate noteworthy assumptions that the writer thinks readers should be alerted to. – Success guarantees (or postconditions) state what must be true on successful completion of the use case - either the main success scenario or some alternate path. The guarantee should meet the needs of all stakeholders.postconditions

Jan 14, Fully Dressed Format Explained Main Success Scenario and Steps (or Basic Flow) – "happy path" scenario, or the more prosaic "Basic Flow" or "Typical Flow." – It describes a typical success path that satisfies the interests of the stakeholders. Guideline – defer all conditional handling to the Extensions section. – always capitalize the actors' names for ease of identification.

Jan 14, Fully Dressed Format Explained Extensions (or Alternate Flows) – Normally comprise the majority of the text. – They indicate all the other scenarios or branches, both success and failure. – Extensions section was considerably longer and more complex than the Main Success Scenario section; this is common. – Extension scenarios are branches from the main success scenario, and so can be notated with respect to its steps 1…N. – For example, at Step 3 of the main success scenario there may be an invalid item identifier, either because it was incorrectly entered or unknown to the system. An extension is labeled "3a"; it first identifies the condition and then the response. Alternate extensions at Step 3 are labeled "3b" and so forth.

Jan 14, Fully Dressed Format Explained Extensions (or Alternate Flows) – If it is desirable to describe an extension condition as possible during any (or at least most) steps, the labels *a, *b, …, can be used

Jan 14, Fully Dressed Format Explained Extensions (or Alternate Flows) – An extension has two parts: the condition and the handling. Guideline: When possible, write the condition as something that can be detected by the system or an actor. To contrast: – 5a. System detects failure to communicate with external tax calculation system service: – 5a. External tax calculation system not working: – Which one you would prefer?

Jan 14, Fully Dressed Format Explained Extensions (or Alternate Flows) – Extension handling can be summarized in one step, or include a sequence, as in this example, which also illustrates notation to indicate that a condition can arise within a range of steps: – 3-6a: Customer asks Cashier to remove an item from the purchase: 1. Cashier enters the item identifier for removal from the sale. 2. System displays updated running total. – At the end of extension handling, by default the scenario merges back with the main success scenario, unless the extension indicates otherwise (such as by halting the system).

Jan 14, Fully Dressed Format Explained Performing Another Use Case Scenario – 3a. Invalid item ID (not found in the example): 1. System signals error and rejects entry. 2. Cashier responds to the error: – 2a. … – 2c. Cashier performs Find Product Help to obtain true item ID and price.

Jan 14, Fully Dressed Format Explained Special Requirements – If a non-functional requirement, quality attribute, or constraint relates specifically to a use case, record it with the use case. These include qualities such as performance, reliability, and usability, and design constraints (often in I/O devices) that have been mandated or considered likely. – many practitioners find it useful to ultimately move and consolidate all non-functional requirements in the Supplementary Specification, for content management, comprehension, and readability, because these requirements usually have to be considered as a whole during architectural analysis.

Jan 14, Fully Dressed Format Explained Technology and Data Variations List – 3a. Item identifier entered by laser scanner or keyboard. – 3b. Item identifier may be any UPC, EAN, JAN, or SKU coding scheme. – 7a. Credit account information entered by card reader or keyboard. – 7b. Credit payment signature captured on paper receipt. But within two years, we predict many customers will want digital signature capture.