This page provides directions to create the Timecard entity using ArgoUML along with its associations to the Person entity. The model is shown below for your reference.
Person class.Timecard class to the diagram and set its stereotype
to Entity.status attribute to Timecard.
However note that status is of type TimecardStatus which
is an enumeration. We must define TimecardStatus first. So create a
class called TimecardStatus. Give it a stereotype of
Enumeration. Add four attributes to it representing the
enumeration values. We give each attribute an initial value which is
a string with its name in uppercase (ie DRAFT, SUBMITTED, APPROVED, and REJECTED)
These values can't be entered directly on the diagram, so type them
into the Initial Value field on the property panel for each attribute.
Now that we have defined TimecardStatus, we
can add the status attribute to Timecard as shown above.begDate and comments attributes to Timecard.Timecard and Person.
To do this, use the Association tool in the toolbar (5th icon from the left). Click on the
the downward pointing triangle just to its right to activate the pulldown menu and select
the directional association tool with the arrowhead in place of the default straight line
(bidirectional) tool. Click on the
Timecard class, drag your mouse to the Person class and release the
mouse. A new association will be created.Timecard end and uncheck Navigable. This will make the
association one-way from Timecard to Person.Timecard end of the association and select
Multiplicity -> 0..*. We'll leave the other end at the default multiplicity of 1.Person end of the association and
type the name submitter. The
Timecard end does not have to be named because it is not navigable.
This completes the submitter association from Timecard to Person.approver association from Timecard to
Person. Move the associations up or down as appropriate so they do not overlap
each other.
We are now ready to generate code for Timecard. Please go back to the main
tutorial page and continue from where you left off.