Models and modelling
Models and modelling

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

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.

Figure 3
Figure 3 A use case model for a system for checking in and out of a hotel

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.

Figure 4
Figure 4 A use case model showing specialisation between actors

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).

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to University-level study, we offer two introductory routes to our qualifications. You could either choose to start with an Access module, or a module which allows you to count your previous learning towards an Open University qualification. Read our guide on Where to take your learning next for more information.

Not ready for formal University study? Then browse over 1000 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus371