Applying UML and Patterns: An Introduction to ObjectOriented Analysis and Design and Iterative Development, Third Edition [Electronic resources]

Craig Larman

نسخه متنی -صفحه : 472/ 257
نمايش فراداده

20.3. Creating Class Definitions from DCDs

At the very least, DCDs depict the class or interface name, superclasses, operation signatures, and attributes of a class. This is sufficient to create a basic class definition in an OO language. If the DCD was drawn in a UML tool, it can generate the basic class definition from the diagrams.

Defining a Class with Method Signatures and Attributes

From the DCD, a mapping to the attribute definitions (Java

fields ) and method signatures for the Java definition of

SalesLineItem is straightforward, as shown in Figure 20.1.

Figure 20.1. SalesLineItem in Java.