An Entry comprises a name and an address for that name. For our simple model, we will represent this data using name and address attributes of Entry, both of type String.


To create the Entry attributes


  1. Click the Entry Class symbol in the Class diagram.
  2. Click on the small Create Element button on the right side of the Entry Class symbol, and select Property. A new attribute will be created.
  3. Type name: String to define the new attribute, and press Return.
  4. Right click on the name attribute and select the visibility public.
  5. Click on the small Create Property button on the right side of the attributes compartment to create another attribute.
  6. Type address: String to define the new attribute, and press Return.
  7. Right click on the address attribute and select the visibility public.

Next: Creating an Entry constructor