© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 2: Realizing Use Cases Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems.

Slides:



Advertisements
Similar presentations
IS514 Lecture Week 9 CRC Cards.
Advertisements

© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 1: Requirements and Classes Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented.
Unified Modeling Language
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Introduction To System Analysis and Design
Systems Analysis and Design in a Changing World, Fourth Edition
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Object-Oriented Analysis and Design. Priorities in O-O Analysis and Design Understanding a system in terms of objects and associations between them. Representing.
03/12/2001 © Bennett, McRobb and Farmer What Are Information Systems? Based on Chapter 1 of Bennett, McRobb and Farmer: Object Oriented Systems.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
HCI Designing Interface Objects. The presentation layer How prototyping can be used to try out different interface designs How to model boundary classes.
COMP1007 Intro to Systems Requirements © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Intro to Systems Requirements Lecture 4 Identifying.
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?
Requirements Analysis
03/12/2001 © Bennett, McRobb and Farmer Activity Diagrams Based on Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
03/12/2001 © Bennett, McRobb and Farmer Development Process Based on Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
03/12/2001 © Bennett, McRobb and Farmer What Is Object-Orientation? Based on Chapter 4 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
03/12/2001 © Bennett, McRobb and Farmer Use Case Diagrams Based on Chapter 6 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Use Case Analysis – continued
Design in IS Development. IS Design in general The satisfaction of new information requirements. Considering the interaction between humans and the new.
03/12/2001 © Bennett, McRobb and Farmer What Are Information Systems? Based on Chapter 1 of Bennett, McRobb and Farmer: Object Oriented Systems.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
The chapter will address the following questions:
Chapter 7: The Object-Oriented Approach to Requirements
Introduction To System Analysis and design
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Refining the Requirements Model
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Chapter 5 Analysis Model. Analysis model (AM) The first step in describing how the system will implement the requirements specification The first step.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 1 Use CasesUse Case Model Campaign Management PackageModelSub-system.
What Is Object-Orientation?
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Presented by: CHAN LAI SAN ( ) REBAH DAW SARREB ( ) FIDA AL-OBAISI ( ) 08 April 2008 (Tuesday 6pm – 7:30pm)
1 Object orientation. 2 What benefits does OO give? Primarily –Encapsulation (Associates data & operations) –Types & specialisation –Software re-use.
1 Analysis Extracting from Use Cases to Create Diagrams.
IS0514Slide 1 IS0514 Lecture - Week 1 (Semester 2) Business Systems Development Tools and Techniques.
Systems Analysis and Design in a Changing World, 3rd Edition
10/27/20151 WXGC6102: Object-Oriented Techniques Requirements Analysis References: Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
© Bennett, McRobb and Farmer Requirements Analysis Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
03/12/2001 © Bennett, McRobb and Farmer 2005 Refining the Requirements Model Based on Chapter 8 of Bennett, McRobb and Farmer: Object Oriented Systems.
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
© Bennett, McRobb and Farmer Avoiding the Problems Based on Chapter 3 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
© 2010 Bennett, McRobb and Farmer1 Development Process Based on Chapter 5 Bennett, McRobb and Farmer Object Oriented Systems Analysis and Design Using.
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : listCampaigns *[For.
03/12/2001 © Bennett, McRobb and Farmer What Are Information Systems? Based on Chapter 1 of Bennett, McRobb and Farmer: Object Oriented Systems.
Software Systems Design – 4 Class Diagrams (dynamic)
© Bennett, McRobb and Farmer 2005
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
© Bennett, McRobb and Farmer Object Interaction – Sequence Diagrams Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Development Process Based on Chapter 5 Bennett, McRobb and Farmer
DATA REQIREMENT ANALYSIS
WXGC6102: Object-Oriented Techniques
Modelling Concepts Based on Chapter 5 Bennett, McRobb and Farmer
IS0514 Lecture Week 3 Use Case Modelling.
Object Interaction – Sequence Diagrams
What Is Object-Orientation?
Systems Analysis and Design I
Systems Analysis and Design I
Use Case Analysis – continued
Refining the Requirements Model
Presentation transcript:

© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 2: Realizing Use Cases Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (4th Edition), McGraw Hill, 2010.

2© 2010 Bennett, McRobb and Farmer In This Lecture You Will Learn: What is meant by use case realization Two approaches for realizing use cases: –Robustness analysis combined with communication diagrams –Class-Responsibility-Collaboration (CRC) How to combine use case class diagrams into a single analysis class model

3© 2010 Bennett, McRobb and Farmer From Requirements to Classes Requirements (use cases) are usually expressed in user language Use cases are units of development, but they are not structured like software The software we will implement consists of classes We need a way to translate requirements into classes

4© 2010 Bennett, McRobb and Farmer Goal of Realization An analysis class diagram is only an interim product This in turn will be realized as a design class diagram The ultimate product of realization is the software implementation of that use case

5© 2010 Bennett, McRobb and Farmer Communication Diagram Approach Analyse one use case at a time Identify likely classes involved (the use case collaboration) –These may come from a domain model Draw a communication diagram that fulfils the needs of the use case Translate this into a use case class diagram Repeat for other use cases Assemble the use case class diagrams into a single analysis class diagram

6© 2010 Bennett, McRobb and Farmer Robustness Analysis Aims to produce set of classes robust enough to meet requirements of a use case Makes some assumptions about the interaction: –Assumes some class or classes are needed to handle the user interface –Abstracts logic of the use case away from entity classes (that store persistent data)

7© 2010 Bennett, McRobb and Farmer Robustness Analysis: Class Stereotypes Class stereotypes differentiate the roles objects can play: –Boundary objects model interaction between the system and actors (and other systems) –Control objects co-ordinate and control other objects –Entity objects represent information and behaviour in the application domain –Entity classes may be imported from domain model –Boundary and control classes are more likely to be unique to one application

8© 2010 Bennett, McRobb and Farmer Boundary Class Stereotype Boundary classes represent interaction with the user - likely to be unique to the use case but inherited from a library Alternative notations: User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( ) > User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( )

9© 2010 Bennett, McRobb and Farmer Entity Class Stereotype Entity classes represent persistent data and common behaviour likely to be used in more than one application system Alternative notations : Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( ) > Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( )

10© 2010 Bennett, McRobb and Farmer Control Class Stereotype Control classes encapsulate unique behaviour of a use case Specific logic kept separate from the common behaviour of entity classes Alternative notations: AddAvert Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( ) > Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( )

11© 2010 Bennett, McRobb and Farmer Use Case and Collaboration Campaign Manager Add a new advert to a campaign > Add a new advert to a campaign

12© 2010 Bennett, McRobb and Farmer A Possible Collaboration Add a new advert to a campaign :Advert :Campaign :Client :AddAdvert :AddAdvertUI

13© 2010 Bennett, McRobb and Farmer Early Draft Communication Diagram

14© 2010 Bennett, McRobb and Farmer More Developed Communication Diagram

15© 2010 Bennett, McRobb and Farmer Resulting Class Diagram Advert setCompleted() createNewAdvert() «entity» User Interface::AddAdvertUI startInterface() createNewAdvert() selectClient() selectCampaign() «boundary» Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert() «entity» 10..* conducted by Client companyAddress companyName companyTelephone companyFax company getClientCampaigns() getClients() «entity» 10..* places Control::AddAdvert showClientCampaigns() showCampaignAdverts() createNewAdvert() «control»

16© 2010 Bennett, McRobb and Farmer Reasonability Checks for Candidate Classes A number of tests help to check whether a candidate class is reasonable –Is it beyond the scope of the system? –Does it refer to the system as a whole? –Does it duplicate another class? –Is it too vague? (More on next slide)

17© 2010 Bennett, McRobb and Farmer Reasonability Checks for Candidate Classes (cont’d) –Is it too tied up with physical inputs and outputs? –Is it really an attribute? –Is it really an operation? –Is it really an association? If any answer is ‘Yes’, consider modelling the potential class in some other way (or do not model it at all)

18© 2010 Bennett, McRobb and Farmer CRC Cards Class–Responsibility–Collaboration cards help to model interaction between objects Used as a way of: –Identifying classes that participate in a scenario –Allocating responsibilities - both operations and attributes (what can I do? and what do I know?) For a given scenario (or use case): –Brainstorm the objects –Allocate to team members –Role play the interaction

19© 2010 Bennett, McRobb and Farmer CRC Cards Class Name: CollaborationsResponsibilities Responsibilities of a class are listed in this section. Collaborations with other classes are listed here, together with a brief description of the purpose of the collaboration.

20© 2010 Bennett, McRobb and Farmer Class Name Client ResponsibilitiesCollaborations Provide client information. Campaign provides campaign details. Class Name Campaign ResponsibilitiesCollaborations Provide campaign information. Provide list of adverts. Add a new advert. Advert provides advert details. Advert constructs new object. Class Name Advert ResponsibilitiesCollaborations Provide advert details. Construct adverts. Provide list of campaigns.

21© 2010 Bennett, McRobb and Farmer CRC Cards Effective role play depends on an explicit strategy for distributing responsibility among classes For example: –Each role player tries to be lazy –Persuades other players their class should accept responsibility for a given task May use ‘Paper CASE’ to document the associations and links

22© 2010 Bennett, McRobb and Farmer Assembling the Class Diagram However individual use cases are analysed, the aim is to produce a single analysis class diagram This models the application as a whole The concept is simple: –A class in the analysis model needs all the details required for that class in each separate use case

23© 2010 Bennett, McRobb and Farmer

24© 2010 Bennett, McRobb and Farmer

25© 2010 Bennett, McRobb and Farmer Summary In this lecture you have learned: What is meant by use case realization How to realize use cases with robustness analysis and communication diagrams How the CRC technique helps identify classes and allocate responsibilities How to assemble the analysis class diagram

26© 2010 Bennett, McRobb and Farmer References Wirfs-Brock (1990) gives a good exposition of CRC cards (For full bibliographic details, see Bennett, McRobb and Farmer)