Presentation is loading. Please wait.

Presentation is loading. Please wait.

November 200491.3913 Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,

Similar presentations


Presentation on theme: "November 200491.3913 Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,"— Presentation transcript:

1 November 200491.3913 Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces, attribute types, dependencies n we are designing software classes now - no longer conceptual Ch 19

2 November 200491.3913 Ron McFadyen2 analysis design Figure 19.2

3 November 200491.3913 Ron McFadyen3 An interaction diagram showing a register sending a makeLineItem message to a sale, implies that the Sale software class must have a makeLineItem method Usually don’t show create, accessor, or mutator methods uninteresting Messages imply Methods (figure 19.4)

4 November 200491.3913 Ron McFadyen4 Figure 19.8 The navigability arrow (also called a navigability adornment) indicates that a Register object is connected uni-directionally to Sale objects … the Register class has an attribute, currentSale, pointing to a Sale object Do we have any interaction diagrams showing a message from a Sale object to a Register object? Navigability

5 November 200491.3913 Ron McFadyen5 The directed arrow is unidirectional, and shows navigability. The above shows that a register object can navigate to a sale object: I.e. a register needs to know the sale object, but not the other way around. Register can send a message to a sale, sale can respond, but doesn’t initiate. In an OO language, Register will have an attribute that references a Sale instance

6 November 200491.3913 Ron McFadyen6 Navigability: An association line with a navigability adornment indicates that an object of one class (A) is connected uni-directionally to an object of another class (B) An object of class A can navigate to an object of class B. I.e. an object of class A needs to know the B object, but not the other way around. A can send a message to an instance of B, the instance can respond, but doesn’t initiate. An association line that has no specific navigation indicated, is considered to be bi-directional In an OO language, an A will have an attribute that references a B instance A b: B B

7 November 200491.3913 Ron McFadyen7 In Figure 19.10, we see the result from analyzing all interaction diagrams for navigability.

8 November 200491.3913 Ron McFadyen8 In Figure 19.11, we see additional dependencies shown … the dashed arrow line … register and sale have visibility to ProductSpecifications … register knows of a product due to the lookup in the catalogue and a sale receives a product specification in the makeLineItem message

9 November 200491.3913 Ron McFadyen9 Figure 20.6 MultiObjects

10 November 200491.3913 Ron McFadyen10 Figure 20.6 MultiObjects Product catalog will contain the product specifications, and so the find is implemented within the Product Catalog. Sale will contain the sales line items, and so the add is implemented within the sale.


Download ppt "November 200491.3913 Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,"

Similar presentations


Ads by Google