6.5 More about actors
In the hotel example, you saw two actors in the use case diagram shown in Figure 3 (reproduced below). Why is the actor Guest associated with the use case for making a reservation but not associated with the use cases for checking in and out? The answer comes from an understanding of what happens when someone, a guest, arrives at a hotel. Hotels are service oriented. That is to say, they offer certain services to their guests with the intention of earning money for the business. A hotel employs its staff on this basis. In particular, a hotel will employ a receptionist, who will be the real user of the proposed software system, to deal with guests on their arrival and departure; a guest will not use the system.
However, if a goal of the new system is to allow potential guests to use their web browser to make reservations in addition to contacting a hotel directly, the potential guest will be a user of the proposed software system. Hence the use case diagram must show Guest as an actor for the make reservation use case as in Figure 3. Since people will still be using other methods of requesting a room, such as by telephoning or sending a letter to the hotel, we should allow for a member of the hotel's staff to perform the service. Hence the use case diagram in Figure 3 and the use case description in Table 2 include both the Receptionist and Guest actors.
If you need to include some significant information about the roles that actors play, you can do so by expanding the use case diagram in the following way. Since either a guest or a receptionist can make a reservation it may be better to think of a new kind of actor, a Reserver, say, who could be either a Guest or a Receptionist. The use case shown in Figure 3 can then be modified to the one shown in Figure 4.
The notation used in Figure 4 indicates that Guest and Receptionist are specialisations of Reserver (or Reserver is a generalisation of Guest and Receptionist). That is, a Guest (or Receptionist) can do the same thing as a Reserver (but they can do other things as well).