Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

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.
Ch 12: Object-Oriented Analysis
Chapter 18 Object-Oriented Systems Analysis and Design Using UML
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.
Slide 6C.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
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 11D.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 10B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 8B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 7B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Chapter 21 Object-Oriented Analysis
Slide 8A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 7C.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
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 5B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
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.
Slide 10C.52 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Slide 12E.121 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Chapter 7: The Object-Oriented Approach to Requirements
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.
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 7 Slide 1 The requirements engineering process.
Slide 16B.51 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
CSC 213 – Large Scale Programming Lecture 3: Object-Oriented Analysis.
Slide 10A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11.
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.
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.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
Systems Analysis and Design in a Changing World, 3rd Edition
Slide 13B.22 © 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.
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 13.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
THE ANALYSIS WORKFLOW  The specification document  Informal specifications  The analysis workflow  Extracting the entity classes  Functional modeling:
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
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Slide 6D.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
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.
Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2010 Stephen R. Schach
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Slide 13A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
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
Systems Analysis and Design in a Changing World, Fourth Edition
Cmpe 589 Spring 2006.
Object-Oriented Analysis (OOA)
Object-Oriented Analysis
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Presentation transcript:

Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach

Slide 12A.2 © The McGraw-Hill Companies, 2005 CHAPTER 12 — Unit A OBJECT-ORIENTED ANALYSIS

Slide 12A.3 © The McGraw-Hill Companies, 2005 Overview l The analysis workflow l Extracting the entity classes l Object-oriented analysis: The elevator problem case study l Functional modeling: The elevator problem case study l Entity class modeling: The elevator problem case study l Dynamic modeling: The elevator problem case study l The test workflow: Object-oriented analysis

Slide 12A.4 © The McGraw-Hill Companies, 2005 Overview (contd) l Extracting the boundary and control classes l The initial functional model: The Osbert Oglesby case study l The initial class diagram: The Osbert Oglesby case study l The initial dynamic model: The Osbert Oglesby case study l Extracting the boundary classes: The Osbert Oglesby case study

Slide 12A.5 © The McGraw-Hill Companies, 2005 Overview (contd) l Refining the use cases: The Osbert Oglesby case study l Use-case realization: The Osbert Oglesby case study l Incrementing the class diagram: The Osbert Oglesby case study l The specification document in the Unified Process l More on actors and use cases l CASE tools for the object-oriented analysis workflow l Challenges of the object-oriented analysis workflow

Slide 12A.6 © The McGraw-Hill Companies, 2005 Object-Oriented Analysis l 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 l During this workflow  The classes are extracted l Remark  The Unified Process assumes knowledge of class extraction

Slide 12A.7 © The McGraw-Hill Companies, The Analysis Workflow l 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

Slide 12A.8 © The McGraw-Hill Companies, 2005 The Analysis Workflow (contd) l There are three types of classes: l Entity classes l Boundary classes l Control classes

Slide 12A.9 © The McGraw-Hill Companies, 2005 The Analysis Workflow (contd) l Entity class  Models long-lived information l Examples:  Account Class  Painting Class

Slide 12A.10 © The McGraw-Hill Companies, 2005 The Analysis Workflow (contd) l Boundary class  Models the interaction between the product and the environment  A boundary class is generally associated with input or output l Examples:  Purchases Report Class  Sales Report Class

Slide 12A.11 © The McGraw-Hill Companies, 2005 The Analysis Workflow (contd) l Control class  Models complex computations and algorithms l Examples:  Compute Masterpiece Price Class  Compute Masterwork Price Class  Compute Other Painting Price Class

Slide 12A.12 © The McGraw-Hill Companies, 2005 UML Notation for These Three Class Types l Stereotypes (extensions of UML) Figure 12.1

Slide 12A.13 © The McGraw-Hill Companies, Extracting the Entity Classes l 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

Slide 12A.14 © The McGraw-Hill Companies, Object-Oriented Analysis: The Elevator Problem Case Study 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

Slide 12A.15 © The McGraw-Hill Companies, Functional Modeling: The Elevator Problem Case Study l A use case describes the interaction between  The product, and  The actors (external users)

Slide 12A.16 © The McGraw-Hill Companies, 2005 Use Cases l For the elevator problem, there are only two possible use cases  Press an Elevator Button, and  Press a Floor Button Figure 12.2

Slide 12A.17 © The McGraw-Hill Companies, 2005 Scenarios l A use case provides a generic description of the overall functionality l A scenario is an instance of a use case l Sufficient scenarios need to be studied to get a comprehensive insight into the target product being modeled

Slide 12A.18 © The McGraw-Hill Companies, 2005 Normal Scenario: Elevator Problem Figure 12.3

Slide 12A.19 © The McGraw-Hill Companies, 2005 Exception Scenario: Elevator Problem Figure 12.4

Slide 12A.20 © The McGraw-Hill Companies, Entity Class Modeling : The Elevator Problem Case Study l Extract classes and their attributes  Represent them using a UML diagram l One alternative: Deduce the classes from use cases and their scenarios  Possible danger: Often there are many scenarios, and hence  Too many candidate classes l Other alternatives:  CRC cards (if you have domain knowledge)  Noun extraction

Slide 12A.21 © The McGraw-Hill Companies, Noun Extraction l A two-stage process l Stage 1. Concise problem definition  Describe the software product in single paragraph  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

Slide 12A.22 © The McGraw-Hill Companies, 2005 Noun Extraction (contd) l 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 l Use the nouns as candidate classes

Slide 12A.23 © The McGraw-Hill Companies, 2005 Noun Extraction (contd) l 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) l Candidate classes:  Elevator and Button l Subclasses:  Elevator Button and Floor Button

Slide 12A.24 © The McGraw-Hill Companies, 2005 First Iteration of Class Diagram l Problem  Buttons do not communicate directly with elevators  We need an additional class: Elevator Controller Figure 12.5

Slide 12A.25 © The McGraw-Hill Companies, 2005 Second Iteration of Class Diagram l All relationships are now 1-to-n  This makes design and implementation easier Figure 12.6

Slide 12A.26 © The McGraw-Hill Companies, CRC Cards l Used since 1989 for OOA l For each class, fill in a card showing  Name of Class  Functionality (Responsibility)  List of classes it invokes (Collaboration) l Now CRC cards are automated (CASE tool component)

Slide 12A.27 © The McGraw-Hill Companies, 2005 CRC Cards (contd) l Strength  When acted out by team members, CRC cards are a powerful tool for highlighting missing or incorrect items l Weakness  If CRC cards are used to identify entity classes, domain expertise is needed

Slide 12A.28 © The McGraw-Hill Companies, Dynamic Modeling: The Elevator Problem Case Study l Produce a UML statechart l State, event, and predicate are distributed over the statechart Figure 12.7

Slide 12A.29 © The McGraw-Hill Companies, 2005 Dynamic Modeling: Elevator Problem (contd) l This UML statechart is equivalent to the state transition diagram of Figures through l This is shown by considering specific scenarios l In fact, a statechart is constructed by modeling the events of the scenarios

Slide 12A.30 © The McGraw-Hill Companies, 2005 Continued in Unit 12B