An Introduction to Object-Oriented Systems Analysis and Design with UML and the Unified Process McGraw-Hill, 2004 Stephen R. Schach [email protected] 6 — Unit BSlide 3Fifth Iteration of the Initial Class Diagram (contd)Dynamic ModelingThe Concept of StateInitial Dynamic Model: Osbert OglesbyInitial Dynamic Model: Osbert Oglesby (contd)Slide 9Slide 10Slide 11Slide 12Dynamic Modeling (contd)Extracting Boundary ClassesInitial Boundary Classes: Osbert OglesbyInitial Boundary Classes: Osbert Oglesby (contd)Slide 17Slide 18Slide 19Slide 20Slide 21Extracting Control ClassesInitial Control Classes: Osbert OglesbySlide 24Initial Control Classes: Osbert Oglesby (contd)Refining the Use Cases: Osbert OglesbyRefining the Use Cases: Osbert Oglesby (contd)Slide 28Third Iteration of the Use-Case DiagramClass Extraction (contd)Use-Case RealizationUse-Case Realization (contd)Slide 33Buy a Masterpiece Use CaseBuy a Masterpiece Use Case (contd)Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 6B.1Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction toObject-Oriented Systems Analysis and Design with UML and the Unified Process McGraw-Hill, 2004Stephen R. [email protected] 6B.2Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. CHAPTER 6 — Unit BTHE ANALYSIS WORKFLOW ISlide 6B.3Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Continued from Unit 6ASlide 6B.4Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Fifth Iteration of the Initial Class Diagram (contd)Slide 6B.5Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic ModelingDynamic modeling is the third step in object-oriented analysisA statechart is constructed that reflects all the operations performed by or to the information systemThe operations are determined from the scenariosSlide 6B.6Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. The Concept of StateThe state of an information system is a particular set of values of the attributes of that system–The state is often represented by a specific screenEach event causes the system to move from state to state, that is, it causes a transition between statesExample: Microsoft Word–The state is the current screen–An event is to select (say) Font from the Format Menu–The Font screen is then the new stateSlide 6B.7Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Dynamic Model: Osbert OglesbyInitial statechartSlide 6B.8Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Dynamic Model: Osbert Oglesby (contd)The solid circle (top left) represents the initial stateThe white circle with the small black circle inside (top right) represents the final stateStates other than the initial and final states are represented by rectangles with rounded cornersThe arrows represent transitions from state to state–Example: The arrow from the initial state to the state labeled Osbert Oglesby Information System LoopSlide 6B.9Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Dynamic Model: Osbert Oglesby (contd) In state Osbert Oglesby Information System Loop, one of five events can occur:–Osbert can choose one of five options: buy a painting, sell a painting, print a report, update a fashionability coefficient, or quit These possibilities are indicated by the five events:–buy painting selected–sell painting selected–print report selected–update fashionability selected–quit selectedSlide 6B.10Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Dynamic Model: Osbert OglesbyThe initial main menu in the target Osbert Oglesby information systemSlide 6B.11Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Dynamic Model: Osbert Oglesby (contd)Suppose that Osbert clicks on Buy a painting in the menu–The event buy painting selected has now occurred–The system moves from its current state, Osbert Oglesby Information System Loop, to the state Buying a PaintingIn Buying a Painting state, Osbert can –Buy a masterpiece, masterwork, or other paintingSlide 6B.12Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Dynamic Model: Osbert Oglesby (contd)The Osbert Oglesby information system moves from state to state when an event occurs–In each state, Osbert performs one of the operations supported by that stateThis continues until Osbert clicks on option Quit while the system is in state Oglesby Information System Loop–At this time the information system enters the final state (represented by the white circle containing the small black circle)–This terminates execution of the statechartSlide 6B.13Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Modeling (contd)Traditionally there is a dynamic model for each class, rather than for the system as a whole, as in this case study–However, objects in information systems rarely move from one class to another classAccordingly, a dynamic model for the information system as a whole is appropriateSlide 6B.14Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Extracting Boundary ClassesIt is usually easy to extract boundary classes–Each input screen, output screen, and printed report is generally modeled by a boundary classSlide 6B.15Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Boundary Classes: Osbert OglesbyOne screen should be adequate for all four Osbert Oglesby use cases:–Buy a Painting–Sell a Painting–Print a Report–Modify a Fashionability CoefficientThus there is one initial boundary class–User Interface ClassSlide 6B.16Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Boundary Classes: Osbert Oglesby (contd)Consider again the first iteration of the main menu of the user-interface screenThe five commands correspond precisely to the five events in the statechartSlide 6B.17Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Boundary Classes: Osbert Oglesby (contd)This is a graphical interface, which needs special softwareSlide 6B.18Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights
View Full Document