Software Engineering Object-Oriented Analysis (Use Cases) James Gain

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Software Engineering OO Analysis (Object-Relationship and Object-Behaviour Models)
Chapter 8 Analysis Engineering Software Engineering: A Practitioner’s Approach by Roger S. Pressman.
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
UML: Use Cases Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Use-case Modeling.
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Detailed Object-Oriented Requirements Definitions
Object-Oriented Analysis
UFCEPM-15-M Object-oriented Design and Programming Jin Sa.
The chapter will address the following questions:
USE Case Model.
Objects What are Objects Observations
OO Design Notations Original version by B.Rogers/M.Utting.
Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
Object-Oriented Analysis - Instructor Notes
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
Data Flow Diagrams.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
The Unified Modeling Language Part I Omar Meqdadi SE 2730 Lecture 6 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Object Oriented Analysis and Design System Events & Contracts.
Objectives Detailed Object-Oriented Requirements Definitions
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
1 Analysis Extracting from Use Cases to Create Diagrams.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Software Engineering Object Oriented Analysis. Objectives 1.To outline an Object Oriented Analysis process and modelling language 2.To study the process.
Systems Analysis and Design in a Changing World, 3rd Edition
CS /31 Illinois Institute of Technology CS487 Software Engineering OOA with UML David Lash.
Software Engineering Object-Oriented Analysis (Class Diagrams) James Gain
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
Object Oriented Analysis
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Software Engineering OO Analysis (Object-Behaviour Models)
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Analysis Modeling CpSc 372: Introduction to Software Engineering
Requirement Engineering. Recap Flow Based Modeling DFDs CFDs Processing narratives Class-based Model How to select classes? How to find attributes and.
Software Requirements Engineering Elaboration Process Lecture-14.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Understanding Requirements
Use Case Diagrams Lecture Oo14 Use Cases. References n Booch, et al, The Unified modeling Language User’s Guide, AWL, 1999, Chapt 16 & 17 n Fowler & Scott,
UML - Development Process 1 Software Development Process Using UML.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Object-Oriented Systems. Goals Object-Oriented Methodologies – The Rumbaugh et al. OMT – The Booch methodology – Jacobson's methodologies.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
1 Object Oriented Analysis and Design System Events & Contracts.
Software Engineering Object-Oriented Analysis (CRC Cards) James Gain
Chapter 8 Analysis Engineering
SafeHome Product.
UML Use Case Diagrams.
OO Domain Modeling With UML Class Diagrams and CRC Cards
Software Design Methodologies and Testing
Presentation transcript:

Software Engineering Object-Oriented Analysis (Use Cases) James Gain

Objectives 1.Outline the history and concepts of Object- Oriented Analysis 2.Introduce the Unified Modelling Language (UML) 3.Study the process and notation associated with Use-Cases 4.Provide a case study and exercise on Use-Cases in action

[1] Analysis Process lThe steps taken in order to complete an analysis (the algorithm) lThe OOA process landscape:  Booch: evolutionary process encompassing both a ‘macro’ and ‘micro’ development process  Rumbaugh: OMT (Object Modeling Technique) producing object, dynamic and functional models  Jacobson: OOSE (Object Oriented Software Engineering) emphasises Use-Cases  Coad and Yourdon: Viewed as one of the easiest  Wirfs-Brock: No clear distinction between analysis and design lBUT All are similar with small annoying differences lBooch, Rumbaugh and Jacobson now combined (into Objectory - a heavyweight life-cycle model)

Generic Process lMost OOA processes have the following steps in common: 1.Elicit customer requirements 2.Identify scenarios or use-cases 3.Extract candidate classes 4.Identify attributes and methods 5.Define a class hierarchy 6.Build an object-relationship model 7.Build an object-behaviour model 8.Review the OO analysis against the use-cases 9.Repeat as required

Modelling Language lA modelling language is a means of specifying, visualizing and documenting the artifacts of a software systems lThese models are the primary means of communication between users and developers lModelling languages specify a notation lIt is important that they be standardized

[2] Unified Modelling Language lA notational System (including syntax, semantics and pragmatics for its notations) that is principally graphical and aimed at modelling systems using object-oriented concepts. lUML is not a process, methodology or proprietary lCombines the notations of Booch, Rumbaugh and Jacobson lStandardized by the OMG (Object Management Group) lDefines a notation and a meta-model (defining the notation using the notation) lConsists of:  Views (shows different faces of the system and links with the process, e.g. user, structural, behavioural, etc.)  Diagrams (graphs that describe the contents of a view)  Model elements (concepts used in a diagram)

Analysis = Process + Models ProcessModel Output 1. Elicit customer requirements and identify use-cases Use-Case Diagrams 2. Extract candidate classes, Identify attributes and methods, Define a class hierarchy Class Responsibility Collaborator (CRC) Cards 3. Build an object-relationship model Class Diagram 4. Build an object-behaviour model Interaction Diagram

[3] Use Cases lA view of a system that emphasizes the behaviour as it appears to outside users. lPartitions system functionality into transactions (‘use cases’) that are meaningful to users (‘actors’). lConsists of scenarios - typical interaction between a user and a computer system (a thread of usage of a system) lProperties:  Captures some user-visible function  Achieves a discrete goal for the user  No attempt to represent order or number of times actions are executed lCaptured by talking to a typical user and discussing what they want to achieve with the system. lUse-cases can be used to derive structural and behavioural models and construct test cases.

[3] Use Case Diagrams lGraphically shows use-cases, actors and their relationships. Use Case Communication Relationship Actor Analyze Risk Trader Price Deal Capture Deal Valuation Limits Exceeded > Uses Relationship Extends Relationship

Use Cases lFundamentally a system transaction lArranged in a hierarchy.  At the top level a system box can enclose the use-cases  At lower levels each use-case is decomposed into several more detailed use-cases lUse cases often start with a verb in order to emphasize that they are processes (Buy Items, Price Deal) Valuation Share Trade System

Actors lactors represent roles people or devices play as the system functions. They communicate with the system and are external to it. lusers can play a number of different roles for a given scenario.  Example: an operator on a production line might have many roles (programmer, tester, monitor, troubleshooter). Each of these would represent an actor in the use-case lA single actor may perform many use-cases; a use-case may have several actors performing it lSystem (non-human) actors should only be shown when they are the ones that need the use case  Example: If the system generates a file that is later picked up by the accounting system then the accounting system is a relevant actor. Trader

Relationships lCommunication:  Flow of data and control between an actor and use-case lUses:  Use uses when you are repeating yourself in two or more separate use cases and you want to avoid repetition lExtends:  Use extends when you are describing a carefully controlled variation on normal behaviour  Useful for identify core and extended functionality  Needs to have extension points (specific aspects that are extended) lGeneralizes  A casual description of a variation on normal behaviour >

Use Case Narratives lFor each use-case provide a narrative document lFor example: Use Case:Buy Item Actors:Customer, Cashier Description: - The use case begins when the customer arrives at a checkout with items to purchase. - The Cashier records each item. If there is more than one of an item, the Cashier can enter the quantity as well. - The system determines the item price and adds the information to the running sales transaction. The description and price of the current item are presented. - On completion of item entry, the cashier indicates that item entry is complete. - The system calculates and presents the sale total.

Developing a Use Case lAsk yourself these questions:  What are the main tasks or functions that are performed by the actor?  What system information will the the actor acquire, produce or change?  Will the actor have to inform the system about changes in the external environment?  What information does the actor desire from the system?  Does the actor wish to be informed about unexpected changes?

Modelling Tips lMake sure that each use case describes a significant chunk of system usage that is understandable by both domain experts and programmers lWhen defining use cases in text, use nouns and verbs accurately and consistently to help with later derivation of objects. lA use case diagram should  contain only use cases at the same level of abstraction  include only actors who are required lTry to describe use cases independent of implementation  A common mistake is to use chains of uses and extends to describe internal details lA use case can have many scenarios (threads of execution)

[4] Case Study: Use Cases lReminder:  Convert a photographic image into a simulated mosaic with square tiles  Tiles must follow curves but still be closely spaced lUser Interface: 1.Select image 2.Draw contours 3.Set parameters (e.g. tile size) 4.Initiate simulator

High-Level Use Case Narrative Use Case:Mosaic Builder Actors:Imager, Draftsman, Designer Description: 1.Imager selects a reference picture in electronic image format. 2. a)Draftsman draws edges onto a transparent contour image aligned with the reference picture OR b)System automatically detects edges in the reference picture, places these edges into the contour image. The Draftsman then cleans up the results - strengthening or erasing edges. 3.Designer flood-fills coloured regions onto a region image to distinguish tile sizes. Designer associates coloured regions with tile sizes. 4.Designer specifies number of tiles, colour palette and tile spacing. 5.System generates and displays the mosaic.

High-Level Use Case Diagram

Refined Use Case Narrative lRefine each stage as necessary producing separate Use-Cases: Use Case:2a - Draw Edges Actors:Draftsman Description: 1.A transparent overlay image is placed over the original reference picture. 2.The draftsman draws black edges of a consistent thickness onto the overlay using the mouse. 3.The draftsman is also able to erase edges that are incorrect. 4.The draftsman can save the overlay as a black and white image with the same resolution as the reference picture.

[5] Exercise lExample: Home Security System (SafeHome) lProject Brief (provided at the start of the project):  Build a micro-processor based home security system that will protect against and/or recognize a variety of undesirable situations such as illegal entry, fire and flooding.  The product will use appropriate sensors to detect each situation, can be programmed by the homeowner and will automatically telephone a monitoring agency when necessary.

lComponents:  homeowner (the user)  sensors (devices attached to the system)  monitoring and response subsystem (central station that monitors SafeHome) lInteractions:  Enters a password to allow all other interactions. This password needs to be validated by the system  Inquires about the status of a security zone which relies on the status of a combination of sensors  Inquires about the status of a sensor  Presses the panic button in an emergency  Activates/deactivates the security system Components and Interactions

Low-level Use Case Narrative Use Case:Activates System Actors:Homeowner Description: 1.The homeowner observes the control panel to determine if the system is ready for input. If the system is not ready, the homeowner must physically close window/doors so that the ready indicator is present [a not ready indicator implies that a sensor is open]. 2.The homeowner uses the keypad to key in a four-digit password. The password is compared with the valid password stored in the system. If the password is incorrect, the control panel will beep once and reset itself for additional input. If the password is correct, the control panel awaits further action. 3.The homeowner selects and keys in stay or away to activate the system. Stay activates only perimeter sensors. Away activates all sensors. 4.When activation occurs, a red alarm light can be observed by the homeowner. Task: Create the corresponding Use-Case Diagram