1 / 25

Chapter 16

Chapter 16. Fig. 16.1. Fig. 16.2. Note: Why no arrow?. Note: If Sale references nothing then the only thing it is associated with is what references it. Note: association name is missing since role name of Sale is used as instance variable name in Register. Fig. 16.3.

kelton
Download Presentation

Chapter 16

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 16

  2. Fig. 16.1

  3. Fig. 16.2 Note: Why no arrow? Note: If Sale references nothing then the only thing it is associated with is what references it Note: association name is missing since role name of Sale is used as instance variable name in Register

  4. Fig. 16.3 Note: Use attribute text when the data type identity is not important, eg primitives. visible

  5. Fig. 16.4

  6. Fig. 16.5

  7. public class Register { private int id; private Sale currentSale; private Store: location; ... }

  8. Fig. 16.6 property string

  9. Fig. 16.7 method declaration return type is also typical Full Syntax: visibility name (param list):return-type {property-string} property-string: exceptions, abstract, friend, etc.

  10. Fig. 16.8

  11. Fig. 16.9 Dependency presence of coupling 1 mSale AClass <<method>> public void foo() { mSale.updatePriceFor(pd) } foo():void

  12. Kinds of Dependency -- having an attribute of supplier type -- sending a message to a supplier using an attribute, param, local variable global variable, static method -- receiving a parameter of a supplier type -- supplier is a supertype or interface Use a dependency line when no other structural line exists.

  13. doX() calls System.runFinalize() Foo System doX() runFinalize()

  14. Fig. 16.11 Example: A factory “creates” an object of a separate class but has no other relationship to the object.

  15. Fig. 16.12

  16. Window1 <<interface>> Timer <<interface>> Timer Window3 Clock3 either one

  17. Fig. 16.13 Note: Author suggests not using general aggregation; only composition.

  18. Fig. 16.14 Constraints constraint: { text between braces}

  19. Fig. 16.15 Qualified Association qualifier is used to select a specific object from a larger set of objects

  20. Fig. 16.16 Association Class model an association with attributes and operations

  21. Fig. 16.17 Singleton

  22. Fig. 16.18 Template Classes

  23. Fig. 16.19 User Defined Compartments

  24. Fig. 16.20 An active class is one controlling its own thread

  25. Fig. 16.21 in Agile, these diagrams a re drawn in parallel

More Related