Slide 12E.121 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Slide 12E.122 © The McGraw-Hill Companies, 2005 CHAPTER 12 — Unit E OBJECT-ORIENTED ANALYSIS
Slide 12E.123 © The McGraw-Hill Companies, 2005 Continued from Unit 12D
Slide 12E.124 © The McGraw-Hill Companies, Buy a Masterwork Use Case l The maximum price of a masterwork is computed by first treating the painting as if it were a masterpiece, and then adjusting the result
Slide 12E.125 © The McGraw-Hill Companies, 2005 The Five Classes That Enter into This Use Case l User Interface Class l Compute Masterwork Price Class This class models the computation of the price Osbert should offer It creates a masterwork object and passes it to Compute Masterpiece Price Class as if it were a masterpiece l Compute Masterpiece Price Class l Masterpiece Class l Auctioned Painting Class
Slide 12E.126 © The McGraw-Hill Companies, 2005 Buy a Masterwork Use Case (contd) l Class diagram (classes that enter into the use case) Figure 12.37
Slide 12E.127 © The McGraw-Hill Companies, 2005 Buy a Masterwork Use Case (contd) l One possible scenario of the use case Figure 12.38
Slide 12E.128 © The McGraw-Hill Companies, 2005 Buy a Masterwork Use Case (contd) The remaining use cases are similar to those for the use case Buy a Masterpiece
Slide 12E.129 © The McGraw-Hill Companies, Buy Other Painting Use Case l Class diagram Figure 12.39
Slide 12E.130 © The McGraw-Hill Companies, 2005 Buy Other Painting Use Case (contd) l Scenarios and interaction diagrams (collaboration diagrams, sequence diagrams), and associated flows of events are left as an exercise (Problems through 12.19)
Slide 12E.131 © The McGraw-Hill Companies, 2005 Modifying the Main Menu l The main menu must reflect buying the three different types of painting explicitly Buy a Painting must be replaced by Buy a Masterpiece, Buy a Masterwork, and Buy Other Painting
Slide 12E.132 © The McGraw-Hill Companies, 2005 Modifying the Main Menu (contd) l The revised screen is generated by : User Interface Class Figure 12.40
Slide 12E.133 © The McGraw-Hill Companies, 2005 l The corresponding textual interface is: Modifying the Main Menu (contd) Figure 12.41
Slide 12E.134 © The McGraw-Hill Companies, 2005 Continued in Unit 12F