Building a UML Class Diagram

   

Now that you have built up your understanding of classes, look again at how class designs can be communicated to other developers. As discussed in Chapter 1, "Object-Oriented Programming," class diagrams are the UML mechanism for identifying class fields and methods and depicting associations between classes. The first step in building a class diagram is to identify the relevant classes and their inheritance relationships. Field and method declarations can be included in the diagram if that level of detail is needed to support the information you are trying to convey . Perhaps the most useful information, however, is that conveying the associations and relationships between classes.

Figure 7.1 depicts a class diagram extrapolated from the previous Car examples.

Figure 7.1. A class diagram for the transportation package depicts inheritance and class associations.

graphics/07fig01.gif

   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net