10/27/20151 WXGC6102: Object-Oriented Techniques Requirements Analysis References: Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.

Slides:



Advertisements
Similar presentations
© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 1: Requirements and Classes Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented.
Advertisements

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Unified Modeling Language
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
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 2002 Refining the Requirements Model Based on Chapter 8 of Bennett, McRobb and Farmer: Object Oriented Systems.
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
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
© Copyright Eliyahu Brutman Programming Techniques Course.
03/12/2001 © Bennett, McRobb and Farmer What Is Object-Orientation? Based on Chapter 4 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
WXGC6102: Object-Oriented Techniques Object Interaction – Sequence Diagrams References: Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems.
03/12/2001 © Bennett, McRobb and Farmer Use Case Diagrams Based on Chapter 6 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Design in IS Development. IS Design in general The satisfaction of new information requirements. Considering the interaction between humans and the new.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
IS0514 Lecture Week 3 Use Case Modelling.
Chapter 7: The Object-Oriented Approach to Requirements
Refining the Requirements Model
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Copyright by Dr. Clarence Lau, IVE(TY)
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 1 Use CasesUse Case Model Campaign Management PackageModelSub-system.
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
1 WXGC6102: Object-Oriented Techniques Modelling Concepts References: Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
Introduction To System Analysis and Design
SYSC 3100 System Analysis and Design Classes Diagrams: Class features.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Asst.Prof. Dr. Surasak Mungsing. 3 Learning Objectives Explain the purpose and various phases of the systems development life cycle (SDLC) Explain when.
1 Analysis Extracting from Use Cases to Create Diagrams.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Systems Analysis and Design in a Changing World, 3rd Edition
© Bennett, McRobb and Farmer Requirements Analysis Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
03/12/2001 © Bennett, McRobb and Farmer 2005 Refining the Requirements Model Based on Chapter 8 of Bennett, McRobb and Farmer: Object Oriented Systems.
03/12/2001 © Bennett, McRobb and Farmer 2002 Refining the Requirements Model Based on Chapter 8 of Bennett, McRobb and Farmer: Object Oriented Systems.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
© 2010 Bennett, McRobb and Farmer1 Object Interaction – Interaction Overview Diagrams Timing Diagrams Based on Chapter 09 Bennett, McRobb and Farmer Object.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : listCampaigns *[For.
WXGC6102: Object-Oriented Techniques Object Interaction – Interaction Overview Diagrams Timing Diagrams References: Chapter 9 of Bennett, McRobb and Farmer:
© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 2: Realizing Use Cases Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes 1 classes a class describes a group of objects with: similar properties (attributes)
Design Model Lecture p6 T120B pavasario sem.
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
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.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
WELCOME TO OUR PRESENTATION UNIFIED MODELING LANGUAGE (UML)
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Object Interaction – Interaction Overview Diagrams Timing Diagrams
WXGC6102: Object-Oriented Techniques
Unified Modeling Language
Object-Oriented Analysis
IS0514 Lecture Week 3 Use Case Modelling.
Object Interaction – Sequence Diagrams
Software Design Lecture : 15.
Systems Analysis and Design I
Systems Analysis and Design I
Systems Analysis and Design I
Systems Analysis and Design I
Presentation transcript:

10/27/20151 WXGC6102: Object-Oriented Techniques Requirements Analysis References: Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (3 rd Edition), McGraw Hill, Object-Oriented Technology - From Diagram to Code with Visual Paradigm for UML, Curtis H.K. Tsang, Clarence S.W. Lau and Y.K. Leung, McGraw-Hill Education (Asia), 2005

10/27/20152 In This Lecture You Will Learn: Why we analyse requirements Technical terms used with class diagrams How the UML class diagram expresses a detailed model of user requirements How to realize use cases with collaboration diagrams and class diagrams How the CRC technique helps identify classes and allocate responsibilities

10/27/20153 Why Analyse Requirements? Use case model alone is not enough – There may be repetition – Some parts may already exist as standard components Analysis aims to identify: – Common elements – Pre-existing elements – Interaction between different requirements

10/27/20154 What a Requirements Model Must Do A requirements model meets two main needs: Confirms what users want a new system to do – Must be understandable for users – Must be correct and complete Specifies what designers must design – Must be unambiguous

10/27/20155 What a Requirements Model Must Do Describes what the software should do Represents people, things and concepts important to understand what is going on Shows connections and interactions among these people, things and concepts Shows the business situation in enough detail to evaluate possible designs Is organized so as to be useful for designing the software

10/27/20156 How We Model the Analysis The main tool used for analysing requirements is the class diagram Two main ways to produce this: – Directly based on knowledge of the application domain (a Domain Model) – By producing a separate class diagram for each use case, then assembling them into a single model (an Analysis Class Model)

10/27/20157 Class Diagram: Stereotypes Analysis class stereotypes differentiate the roles objects can play: – Boundary objects model interaction between the system and actors (and other systems) – Entity objects represent information and behaviour in the application domain – Control objects co-ordinate and control other objects

10/27/20158 Class Diagram: Stereotypes User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( ) > User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( ) Alternative notations for boundary class:

10/27/20159 Class Diagram: Stereotypes Alternative notations for entity class: Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( ) > Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( )

10/27/ Class Diagram: Stereotypes Alternative notations for control class: AddAvert Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( ) > Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( )

10/27/ Class Diagram: Class Symbol Client companyAddress company companyFax companyName companyTelephone Class name compartment Attributes compartment Operations compartment

10/27/ Class Diagram: Instance Symbol FoodCo:Client companyAddress=Evans Farm, Norfolk companyFax= companyName=FoodCo companyTelephone= Object name compartment Attribute values Instances do not have operations

10/27/ Class Diagram: Attributes Attributes are: Part of the essential description of a class The common structure of what the class can ‘know’ Each object has its own value for each attribute in its class

10/27/ Class Diagram: Links FoodCo:Client Yellow Partridge:Client Soong Motor Co:Client Grace Chia:StaffMember Carlos Moncada:StaffMember A link is a logical connection between two objects

10/27/ Class Diagram: Associations Associations represent: The possibility of a logical relationship or connection between objects of one class and objects of another If two objects can be linked, their classes have an association

10/27/ Class Diagram: Associations StaffMember staffName staffNo staffStartDate Client companyAddress company companyFax companyName companyTelephone liaises with staffContact Association role Association Association name Direction in which name should be read

10/27/ Class Diagram: Multiplicity Associations have multiplicity Multiplicity is the range of permitted cardinalities of an association Represent enterprise (or business) rules For example: – Any bank customer may have one or more accounts – Every account is for one, and only one, customer

10/27/ Class Diagram: Multiplicity StaffMember staffName staffNo staffStartDate Client companyAddress company companyFax companyName companyTelephone 1 0..* liaises with Multiplicities Exactly one staff member liaises with each client A staff member may liaise with zero, one or more clients

10/27/ Class Diagram: Operations Operations are: An essential part of the description of a class The common behaviour shared by all objects of the class Services that objects of a class can provide to other objects

10/27/ Class Diagram: Operations Operations describe what instances of a class can do: – Set or reveal attribute values – Perform calculations – Send messages to other objects – Create or destroy links Campaign actualCost campaignFinishDate campaignStartDate completionDate datePaid estimatedCost title checkCampaignBudget ( ) getCampaignContribution ( ) recordPayment ( ) setCompleted ( )

10/27/ From Requirements to Classes Start with one use case Identify the likely classes involved (the use case collaboration) Draw a collaboration diagram that fulfils the needs of the use case Translate this collaboration into a class diagram Repeat for other use cases

10/27/ From Requirements to Classes Campaign Manager Add a new advert to a campaign Advert setCompleted() createNewAdvert() > User Interface::AddAdvertUI startInterface() createNewAdvert() selectClient() selectCampaign() > Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert() > 10..* conducted by Client companyAddress companyName companyTelephone companyFax company getClientCampaigns() getClients() > 10..* places Control::AddAdvert showClientCampaigns() showCampaignAdverts() createNewAdvert() > Add a new advert to a campaign :Advert :Campaign :Clien t :AddAdver t :AddAdvert UI : listCampaigns *[For all client’s campaigns]: getCampaignDetails : Advert *[For all campaign’s adverts]: getAdvertDetails :AddAdvertUI :AddAdvert :Client :Campaign :Advert 3.1: showClientCampaigns 3: selectClient 4: selectCampaign 4.1: showCampaignAdverts 5: createNewAdvert 5.1: addNewAdvert newAd:Advert 2: startInterface 1 *[For all clients]: getClient :CampaignManager sd Add a new advert to a campaign 5.1.1: addNewAdvert 4.1.1: listAdverts

10/27/ : listCampaigns *[For all client’s campaigns]: getCampaignDetails : Advert *[For all campaign’s adverts]: getAdvertDetails :AddAdvertUI :AddAdvert :Client :Campaign :Advert 3.1: showClientCampaigns 3: selectClient 4: selectCampaign 4.1: showCampaignAdverts 5: createNewAdvert 5.1: addNewAdvert newAd:Advert 2: startInterface 1 *[For all clients]: getClient :CampaignManager sd Add a new advert to a campaign 5.1.1: addNewAdvert 4.1.1: listAdverts

10/27/ 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)

10/27/ 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)

10/27/ CRC Cards Class–Responsibility–Collaboration cards help to model interaction between objects For a given scenario (or use case): – Brainstorm the objects – Allocate to team members – Role play the interaction

10/27/ 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.

10/27/ 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.

10/27/ 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

10/27/ Requirements - Use Case Analysis: Structuring Use Case Model

10/27/ Analysis The analysis workflow is to develop the domain class model and start the dynamic modeling. First, we develop the domain class model by applying the transitor(problem statement, domain class model) manipulator. Using this manipulator, we can construct the class model for the system (static modeling) and analyze the dynamic behaviors of the use cases (system modeling).

10/27/ Analysis - Domain Analysis (Class Level) We apply the Transitor(Problem_Statement[use case level], Data_Dictionary.Class_List) manipulator to obtain the domain class model.

10/27/ Analysis - Static Modeling Apply the Transitor (Use_Case_Description, Class_Diagram[analysis])

10/27/ References Wirfs-Brock (1990) gives a good exposition of CRC cards (For full bibliographic details, see Bennett, McRobb and Farmer) Object-Oriented Technology - From Diagram to Code with Visual Paradigm for UML, Curtis H.K. Tsang, Clarence S.W. Lau and Y.K. Leung, McGraw-Hill Education (Asia), 2005