![]() Usually, a diagram doesn't indicate whether an attribute is optional or mandatory, although you can do this by putting the multiplicity after the attribute name in square bracketsfor example, dateReceived : Date. An attribute carries just another kind of notation that you can use if it seems convenient. So what is the difference between an attribute and an association?įrom the conceptual perspective, there is no difference. The UML syntax is visibility name: type = defaultValue, where visibility is the same as for operations, described in the next section. At the implementation level, a Customer has a field (also called an instance variable or a data member) for its name.ĭepending on the detail in the diagram, the notation for an attribute can show the attribute's name, type, and default value. At the specification level, this attribute indicates that a Customer object can tell you its name and has a way of setting a name. Attributes are very similar to associations.Īt the conceptual level, a Customer's name attribute indicates that Customers have names. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |