Slide 12E.121 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering...
-
Upload
cora-goodman -
Category
Documents
-
view
217 -
download
0
Transcript of Slide 12E.121 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering...
Slide 12E.1
© The McGraw-Hill Companies, 2005
Object-Oriented and Classical Software
Engineering
Sixth Edition, WCB/McGraw-Hill, 2005
Stephen R. [email protected]
Slide 12E.2
© The McGraw-Hill Companies, 2005
CHAPTER 12 — Unit E
OBJECT-ORIENTED ANALYSIS
Slide 12E.3
© The McGraw-Hill Companies, 2005
Continued from Unit 12D
Slide 12E.4
© The McGraw-Hill Companies, 2005
12.15.2 Buy a Masterwork Use Case
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.5
© The McGraw-Hill Companies, 2005
The Five Classes That Enter into This Use Case
User Interface Class 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
Compute Masterpiece Price Class Masterpiece Class Auctioned Painting Class
Slide 12E.6
© The McGraw-Hill Companies, 2005
Buy a Masterwork Use Case (contd)
Class diagram (classes that enter into the use case)
Figure 12.37
Slide 12E.7
© The McGraw-Hill Companies, 2005
Buy a Masterwork Use Case (contd)
One possible scenario of the use case
Figure 12.38
Slide 12E.8
© 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.9
© The McGraw-Hill Companies, 2005
12.15.3 Buy Other Painting Use Case
Class diagram
Figure 12.39
Slide 12E.10
© The McGraw-Hill Companies, 2005
Buy Other Painting Use Case (contd)
Scenarios and interaction diagrams (collaboration diagrams, sequence diagrams), and associated flows of events are left as an exercise (Problems 12.16 through 12.19)
Slide 12E.11
© The McGraw-Hill Companies, 2005
Modifying the Main Menu
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, andBuy Other Painting
Slide 12E.12
© The McGraw-Hill Companies, 2005
Modifying the Main Menu (contd)
The revised screen is generated by : User Interface Class
Figure 12.40
Slide 12E.13
© The McGraw-Hill Companies, 2005
The corresponding textual interface is:
Modifying the Main Menu (contd)
Figure 12.41
Slide 12E.14
© The McGraw-Hill Companies, 2005
Continued in Unit 12F