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 AChapter OverviewThe Aims of the Analysis WorkflowClassesEntity ClassesBoundary ClassesControl ClassesStereotypesThe Unified Process and ClassesExtracting Entity ClassesFlowchart for Extracting Entity ClassesInitial Functional Model: Osbert OglesbyUse Case and ScenarioScenario of Use Case Buy a PaintingScenario of Use Case Buy a Painting (contd)Second Scenario of Use Case Buy a PaintingThird Scenario of Use Case Buy a PaintingNormal and Exception ScenariosInitial Functional Model (contd)Initial Class Diagram: Osbert Oglesby Case StudyNoun Extraction: Osbert Oglesby Case StudyNoun Extraction: Osbert Oglesby (contd)Slide 24Slide 25First Iteration of the Initial Class DiagramSecond Iteration of the Initial Class DiagramSecond Iteration of Initial Class Diagram (contd)Third Iteration of the Initial Class DiagramThird Iteration of the Initial Class Diagram (contd)Slide 31Fourth Iteration of the Initial Class DiagramFourth Iteration of the Initial Class Diagram (contd)Slide 34Slide 35Fifth Iteration of the Initial Class DiagramFifth Iteration of the Initial Class Diagram (contd)Slide 38Initial Class Diagram: Osbert Oglesby (contd)Initial Class Diagram (contd)Slide 41Slide 42Slide 43Slide 44Slide 6A.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] 6A.2Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. CHAPTER 6 — Unit ATHE ANALYSIS WORKFLOW ISlide 6A.3Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter OverviewThe Analysis WorkflowExtracting Entity ClassesInitial Functional Model: Osbert Oglesby Case StudyInitial Class diagram: Osbert Oglesby Case StudyInitial Dynamic Model: Osbert Oglesby Case StudyExtracting Boundary ClassesExtracting Control ClassesRefining the Use CasesUse-Case RealizationIncrementing the Class DiagramWhere’s the Specification Document?Slide 6A.4Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. The Aims of the Analysis WorkflowTo obtain a deeper understanding of the requirementsTo describe the requirements in a way that is–Easy to maintain, and –Provides insights into the structure of the target information systemSlide 6A.5Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. ClassesThe three class types in the Unified Process are–Entity classes–Boundary classes–Control classesUML notationSlide 6A.6Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Entity ClassesAn entity class models information that is long livedExamples: –Account Class in a banking information system–Painting Class in the Osbert Oglesby information system–Mortgage Class and Investment Class in the MSG Foundation information systemInstances of all these classes remain in the information system for yearsSlide 6A.7Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Boundary ClassesA boundary class models the interaction between the information system and its actorsBoundary classes are generally associated with input and outputExamples: –Purchases Report Class and Sales Report Class in the Osbert Oglesby information system–Mortgage Listing Class and Investment Listing Class in the MSG Foundation information systemSlide 6A.8Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Control ClassesA control class models complex computations and algorithmsExamples: –Compute Masterpiece Price Class,–Compute Masterwork Price Class, and –Compute Other Painting Price Class in the Osbert Oglesby information systemSlide 6A.9Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. StereotypesUML notation for these three types of classesThese are stereotypes (extensions of UML) –UML allows us to define additional constructs that are not part of UML but which we need in order to model a system accuratelySlide 6A.10Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. The Unified Process and ClassesThe Unified Process does not describe how classes are extracted–Users of the Unified Process are expected to have a background in object-oriented analysis and designWe temporarily suspend this discussion of the Unified Process to explain how classes are extracted, and then return to the Unified ProcessSlide 6A.11Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Extracting Entity ClassesEntity class extraction consists of three steps that are carried out iteratively and incrementally:–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 statechartSlide 6A.12Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Flowchart for Extracting Entity ClassesSlide 6A.13Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Initial Functional Model: Osbert OglesbyRecall the Osbert Oglesby use-case diagram:Slide 6A.14Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use Case and ScenarioA use case depicts all possible interactions of a specific kindA scenario is an instance of a use case –(Just as an object is an instance of a class)Slide 6A.15Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scenario of Use Case Buy a PaintingSlide 6A.16Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scenario of Use Case Buy a Painting (contd)This is a normal scenarioThere are six paragraphs in the scenario–Only four of them are numbered–The two unnumbered sentences»“Osbert wishes to buy a masterpiece” and »“Osbert makes an offer below the maximum purchase price—the offer is accepted by the seller”have nothing to do with the
View Full Document