slide 12e.121 © the mcgraw-hill companies, 2005 object-oriented and classical software engineering...

14
Slide 12E.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach [email protected]

Upload: cora-goodman

Post on 23-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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.1

© The McGraw-Hill Companies, 2005

Object-Oriented and Classical Software

Engineering

Sixth Edition, WCB/McGraw-Hill, 2005

Stephen R. [email protected]

Page 2: 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.2

© The McGraw-Hill Companies, 2005

CHAPTER 12 — Unit E

OBJECT-ORIENTED ANALYSIS

Page 3: 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.3

© The McGraw-Hill Companies, 2005

Continued from Unit 12D

Page 4: 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.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

Page 5: 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.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

Page 6: 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.6

© The McGraw-Hill Companies, 2005

Buy a Masterwork Use Case (contd)

Class diagram (classes that enter into the use case)

Figure 12.37

Page 7: 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.7

© The McGraw-Hill Companies, 2005

Buy a Masterwork Use Case (contd)

One possible scenario of the use case

Figure 12.38

Page 8: 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.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

Page 9: 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.9

© The McGraw-Hill Companies, 2005

12.15.3 Buy Other Painting Use Case

Class diagram

Figure 12.39

Page 10: 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.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)

Page 11: 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.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

Page 12: 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.12

© The McGraw-Hill Companies, 2005

Modifying the Main Menu (contd)

The revised screen is generated by : User Interface Class

Figure 12.40

Page 13: 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.13

© The McGraw-Hill Companies, 2005

The corresponding textual interface is:

Modifying the Main Menu (contd)

Figure 12.41

Page 14: 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.14

© The McGraw-Hill Companies, 2005

Continued in Unit 12F