THE ANALYSIS WORKFLOW  The specification document  Informal specifications  The analysis workflow  Extracting the entity classes  Functional modeling:

Slides:



Advertisements
Similar presentations
Slide 12.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
Advertisements

10 Software Engineering Foundations of Computer Science ã Cengage Learning.
System Modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers. Different.
Object-Oriented Analysis and Design
Use-case Modeling.
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.
Slide 6B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 7D.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Slide 8B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
Slide 7B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Slide 7A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 6A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
1 CS1001 Lecture Overview Object Oriented Design Object Oriented Design.
Slide 7E.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 12C.50 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005.
Case Study: Class Extraction.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Unified Modeling Language
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Objects What are Objects Observations
Slide 11.1 Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented Software Engineering WCB/McGraw-Hill, 2008 Stephen.
OBJECT-ORIENTED ANALYSIS PHASE
Slide 12.1 © The McGraw-Hill Companies, CS 4310: Software Engineering Lecture 7 Systems Analysis Object-Oriented Design.
Classification of UML Diagrams
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
CSC 213 – Large Scale Programming Lecture 3: Object-Oriented Analysis.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Systems Analysis and Design in a Changing World, Fifth Edition
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11.
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!)
Lecture 14 & 15: Object- Oriented Analysis Anita S. Malik Adapted from Schach (2004) Chapter 12.
Chapter 7 System models.
System models l Abstract descriptions of systems whose requirements are being analysed.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 12: Design Phase n 12.1 Design and Abstraction n 12.2 Action-Oriented Design n 12.3 Data Flow Analysis n Data Flow Analysis Example n
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Slide 12.1 Object-Oriented and Classical Software Engineering Chapter 12 Object Oriented Analysis.
Lecture 1: Introduction to Software Engineering WXGE6103 Software Engineering Process and Practice Object-oriented Design.
Slide 11.1 Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. CHAPTER 11 THE ANALYSIS WORKFLOW (Derived from Stephen R. Schach’s.
Petri Nets Invented by Carl Adam Petri in 1962 Concurrent systems with timing problems  Synchronization, race problem, deadlock A petri net consists of.
Slide 12.1 © The McGraw-Hill Companies, 2007 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach.
CHAPTER 13 OBJECT-ORIENTED ANALYSIS. Overview l The analysis workflow l Extracting the entity classes l The elevator problem case study l The test workflow:
Software Engineering Zhang Shuang
Slide 12D.88 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Slide 12F.135 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
CHAPTER 12 OBJECT-ORIENTED ANALYSIS. Overview Extracting the entity classes Object-oriented analysis: The elevator problem case study Functional modeling.
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
Engineering Quality Software Week02 J.N.Kotuba1 SYST Engineering Quality Software.
Slide 11.1 Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented Software Engineering WCB/McGraw-Hill, 2008 Stephen.
Object-Oriented Software Engineering WCB/McGraw-Hill, 2008 Stephen R
Cmpe 589 Spring 2006.
The Movement To Objects
Object-Oriented Analysis (OOA)
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis
University of Houston-Clear Lake
Chapter 20 Object-Oriented Analysis and Design
Copyright 2007 Oxford Consulting, Ltd
Engineering Quality Software
Presentation transcript:

THE ANALYSIS WORKFLOW

 The specification document  Informal specifications  The analysis workflow  Extracting the entity classes  Functional modeling: The elevator problem case study  Entity class modeling: The elevator problem case study

5

 OOA is a semiformal analysis technique for the object-oriented paradigm ◦ There are over 60 equivalent techniques ◦ Today, the Unified Process is the only viable alternative  During this workflow ◦ The classes are extracted  Remark ◦ The Unified Process assumes knowledge of class extraction

 The analysis workflow has two aims ◦ Obtain a deeper understanding of the requirements ◦ Describe them in a way that will result in a maintainable design and implementation

1. Entity classes ◦ Models long-lived information ◦ Examples: Account Class, Investment Class 2. Boundary classes ◦ Models the interaction between the product and the environment ◦ A boundary class is generally associated with input or output ◦ Examples: Investments Report Class, Mortgages Report Class 3. Control classes ◦ Models complex computations and algorithms ◦ Example: Estimate Funds for Week Class

 Stereotypes (extensions of UML) Figure 11.1

 Perform the following three steps incrementally and iteratively ◦ Functional modeling  Present scenarios of all the use cases (a scenario is an instance of a use case) ◦ Class modeling  Determine the entity classes and their attributes  Determine the interrelationships and interactions between the entity classes  Present this information in the form of a class diagram ◦ Dynamic modeling  Determine the operations performed by or to each entity class  Present this information in the form of a statechart

A product is to be installed to control n elevators in a building with m floors. The problem concerns the logic required to move elevators between floors according to the following constraints: 1.Each elevator has a set of m buttons, one for each floor. These illuminate when pressed and cause the elevator to visit the corresponding floor. The illumination is canceled when the corresponding floor is visited by the elevator 2.Each floor, except the first and the top floor, has two buttons, one to request an up-elevator, one to request a down-elevator. These buttons illuminate when pressed. The illumination is canceled when an elevator visits the floor, then moves in the desired direction 3.If an elevator has no requests, it remains at its current floor with its doors closed

 For the elevator problem, there are only two possible use cases ◦ Press an Elevator Button, and ◦ Press a Floor Button Figure 11.2

 Extract classes and their attributes ◦ Represent them using a UML diagram  One alternative: Deduce the classes from use cases and their scenarios ◦ Possible danger: Often there are many scenarios, and hence ◦ Too many candidate classes  Other alternatives: ◦ CRC cards (if you have domain knowledge) ◦ Noun extraction

 A two-stage process  Stage 1. Concise problem definition ◦ Describe the software product in single paragraph

 Stage 2. Identify the nouns ◦ Identify the nouns in the informal strategy ◦ Buttons in elevators and on the floors control the movement of n elevators in a building with m floors. Buttons illuminate when pressed to request the elevator to stop at a specific floor; the illumination is canceled when the request has been satisfied. When an elevator has no requests, it remains at its current floor with its doors closed  Use the nouns as candidate classes

 Nouns ◦ button, elevator, floor, movement, building, illumination, request, door ◦ floor, building, door are outside the problem boundary — exclude ◦ movement, illumination, request are abstract nouns — exclude (they may become attributes)  Candidate classes: ◦ Elevator Class and Button Class  Subclasses: ◦ Elevator Button Class and Floor Button Class

 Problem ◦ Buttons do not communicate directly with elevators ◦ We need an additional class: Elevator Controller Class Figure 11.5

 All relationships are now 1-to-n ◦ This makes design and implementation easier Figure 11.6

 Used since 1989 for OOA  For each class, fill in a card showing ◦ Name of Class ◦ Functionality (Responsibility) ◦ List of classes it invokes (Communication)  Now CRC cards are automated (CASE tool component)

 A statechart is constructed by modeling the events of the scenarios  Produce a UML statechart  State, event, and predicate are distributed over the statechart Figure 11.7

 Consider responsibility ◦ 1.Turn on elevator button  This is totally inappropriate for the object- oriented paradigm ◦ Responsibility-driven design has been ignored ◦ Information hiding has been ignored  Responsibility 1.Turn on elevator button should be 1.Send message to Elevator Button Class to turn itself on

 Also, a class has been overlooked  The elevator doors have a state that changes during execution (class characteristic) ◦ Add class Elevator Doors Class ◦ Safety considerations  Modify the CRC card

Figure 11.9

 Having modified the class diagram, reconsider the ◦ Use-case diagram (no change) ◦ Class diagram (see the next slide) ◦ Statecharts ◦ Scenarios (see the slide after the next slide)

Figure 11.10

 Each ◦ Input screen, ◦ Output screen, and ◦ Report is modeled by its own boundary class  Each nontrivial computation is modeled by a control class

Figure 11.18

 Operations performed on the two entity classes are likely to be very similar ◦ Insertions, deletions, and modifications ◦ All members of both entity classes have to be printed on demand  Mortgage Class and Investment Class should be subclasses of a superclass called Asset Class

Figure 11.19

Figure 11.21

 Dynamic modeling is the third step in extracting the entity classes  A statechart is constructed that reflects all the operations performed by or to the software product  The operations are determined from the scenarios

Figure 11.22

 The statechart reflects the operations of the complete MSG Foundation information system ◦ The solid circle on the top left represents the initial state, the starting point of the statechart ◦ The white circle containing the small black circle on the top right represents the final state ◦ States other than the initial and final states are represented by rectangles with rounded corners ◦ The arrows represent possible transitions from state to state

 An MSG staff member selects an option by clicking on the menu  This graphical user interface (GUI) requires special software Figure 11.23

 The only way a value can be stored on a long-term basis is as an attribute of an instance of that class or its subclasses  Another entity class is needed for storing the estimated annual operating expenses ◦ MSG Application Class

 MSG Application Class has other attributes as well ◦ Attributes that do not appertain to the assets Figure 11.25

 The class diagram redrawn to show the prototypes Figure 11.26

 It is usually easy to extract boundary classes ◦ Each input screen, output screen, and printed report is generally modeled by a boundary class  One screen should be adequate for all four MSG Foundation use cases  Estimate Funds Available for Week  Manage an Asset  Update Estimated Annual Operating Expenses  Produce a Report  Accordingly there is one initial boundary class ◦ User Interface Class

 Three reports have to be printed ◦ The estimated funds for the week report ◦ The listing of all mortgages ◦ The listing of all investments  Each of these has to be modeled by a separate boundary class ◦ Estimated Funds Report Class ◦ Mortgages Report Class ◦ Investments Report Class

 Here are the four initial boundary classes Figure 11.27

 There are three reports: ◦ The purchases report ◦ The sales report ◦ The future trends report  The content of each report is different ◦ Each report therefore has to be modeled by a separate boundary class

l Each computation is usually modeled by a control class l The MSG Foundation case study has just one – Estimate the funds available for the week l There is one initial control class Figure 11.28

 Sequence diagram equivalent to the communication diagram (of the realization of the scenario of the use case) Figure 11.35

 The strength of a sequence diagram is that it shows the flow of messages and their order unambiguously ◦ When transfer of information is the focus of attention, a sequence diagram is superior to a communication diagram  A communication diagram is similar to a class diagram ◦ When the developers are concentrating on the classes, a communication diagram is more useful than the equivalent sequence diagram

 Sequence diagram equivalent to the communication diagram (of the realization of the scenario of the use case) Figure 11.44

 Boundary class User Interface Class appears in all the realizations ◦ The same screen will be used for all commands of the information system  Revised menu Figure 11.45

Figure 11.60

 Rather than inheriting the attributes and services from a single parent class, a system which supports multiple inheritance allows object classes to inherit from several super-classes.  This can lead to semantic conflicts where attributes/services with the same name in different super-classes have different semantics.  Multiple inheritance makes class hierarchy reorganisation more complex.

 An aggregation model shows how classes that are collections are composed of other classes.  Aggregation models are similar to the part-of relationship in semantic data models.

 The Unified Process is use-case driven ◦ The use cases and the artifacts derived from them replace the traditional textual specification document  The client must be shown each use case and associated artifacts, both diagrammatic and textual ◦ These UML diagrams convey to the client more information more accurately than the traditional specification document ◦ The set of UML diagrams can also play the same contractual role as the traditional specification document

 A scenario is a specific execution sequence  The client can therefore appreciate how the product works equally well from ◦ A use case together with its scenarios, or ◦ A rapid prototype  The difference is ◦ The use cases are successively refined, with more information added each time, whereas ◦ The rapid prototype is discarded

 However, a rapid prototype of the user interface is required ◦ Specimen screens and reports are needed (not a complete rapid prototype)

 Diagrams play a major role in the analysis workflow  Diagrams often change ◦ We need a diagramming tool ◦ Many tools go further  All modern tools support UML ◦ Commercial examples  IBM Rational Rose  Together ◦ Open-source example  ArgoUML

 Do not cross the boundary into the design workflow  Do not allocate methods to classes yet ◦ Reallocating methods to classes during stepwise refinement is wasted effort