December 2003
Beginner
288 pages
7h 8m
English
Besides presenting the structure of the class, the class diagram also presents information about the attributes and methods.
Normally, attributes are not thought of as having signatures; methods get all the credit. However, an attribute has a type, and this type is represented in the class diagram. Consider the two attributes that are in the Cabbie example:
-companyName:String -name:String
Both of these attributes are defined as strings. This is represented by the name of the attribute followed by the type (in these cases, String). There could have been attributes that were defined as int and float as well, as in this example:
-companyNumber:float -companyAge:int
By looking at the class diagram, you can tell ...
Read now
Unlock full access