Create Timecard Entity

This page provides directions to create the Timecard entity using ArgoUML. The model is shown below for your reference.

Timecard

Follow the steps below to create the Timecard entity along with the two associations.

  1. Select the diagram called "Domain Objects" and create a class called Timecard in it. Make sure the class is created in the org.andromda.timetracker.domain package by inspecting the tree in the explorer pane.
  2. Set the stereotype of the Timecard class to Entity.
  3. Add the 3 attributes as shown above.
  4. Add the findByCriteria() operation as shown above. By default the operation is created with instance scope. Click "static" in the Modifiers section of the property panel to change it to instance scope. You can confirm the change by checking that the operation name is now underlined on the diagram.
  5. Select the association tool Uni Association Tool from the toolbar. Create an association from Timecard to User.
  6. Double-click on the 2nd association end in the Connections field and confirm that is the correct end by checking that the type is User. Give it the name submitter. Set the multiplicity to 1.
  7. Click Other End tool Other Association End Tool to select the other end of the association. Give this end a multiplicity of 0..1. It doesn't need a name because it's not navigable and won't be used by code.
  8. Similarly add an association from Timecard to User. Give the first (from) end a multiplicity of 0..* and the second (to) end the name approver and a multiplicity of 0..1. Move the associations up or down as appropriate so they and their labels do not overlap each other.
  9. Save the model by selecting FileSave Project.

Now go back to the main tutorial page and continue from where you left off.