Chapter 9 Working with Object-Oriented Models


Linking a class or interface to an actor

During the implementation phase, an actor could be implemented as one or several classes, or one of several interfaces.

Implementation Classes

The Implementation Classes tab shows the list of classes and interfaces used to implement an actor. An actor can be a human being (person, partner) or a machine, or process (automated system). When analyzing what an actor must do, it is necessary to identify the classes and interfaces that need to be created for the actor to perform his task.
In this logic, it is possible to create the classes or interfaces and attach them to an actor.

For example, an actor Car needs the classes Engine and Motorway to perform its task. They are shown as related to the actor in the figure below.


Steps To link a class or interface to an actor:

  1. Double-click the actor symbol to display its property sheet.
  2. Click the Implementation Classes tab to view the list of implemented classes.
  3. Click the Add Objects tool.

    A selection window is displayed listing the available classes and interfaces of the model.

    Note   Select Tools
    All classes and interfaces of the model are displayed by default. Use the Include Sub-Packages tool beside the Folder Selection list to increase the selection, it allows you to include all the classes and interfaces from the packages of the model.

  4. Select the required objects and click OK.


    The selected objects are displayed in the list of implementation classes.

    You can similarly view the name of the actor in the class property sheet: double-click the class to open its property sheet, click the Dependencies tab and select the Actors sub-tab. The name of the actor is automatically added in this sub-tab.

Example

Conceptually, you may link those elements even deeper. Here is an example of an actor in a use case diagram that becomes an object in a communication diagram. This object is then related to a class of a class diagram because it is an instance of this class:

A clerk works in an insurance company. He is an actor of a use case diagram, dealing with customers who declare a car accident.

The clerk actor becomes an object in a communication or sequence diagram; those diagrams representing the actions between the objects, the clerk as an object receives messages from customers and sends messages to his manager, for example.

The clerk as an object is also an instance of a class Clerk that can be found in a class diagram with its attributes and operations.


 


Copyright (C) 2007. Sybase Inc. All rights reserved.