0

I am doing the 2 diagrams for a hotel booking service question. I did look up google and almost all diagram examples seem to have nicely linked up the actors but I just don't seem to be able to do so in my case. Also for the activiy diagram, I feel it fits best only for part of the question and not everything.

I would appreciate any feedback on my work if it is correct/ at least on the correct path and where it need working or its totally off.. Tnks for help.

Question:

A new hotel requires a website to allow potential guests to make a room reservation by specifying the type of room e.g. single, double, and the dates of booking. The hotel has many room types available, each with a room-type name, number of guests and additional facility information. Each room in the hotel has a unique room number and is of one specific type.

If the potential guest has registered with the website, in the past, their previously stored details e.g. contact number, credit car details, can be retrieved to speed up the booking process. If the potential guest has not previously registered they must create an account as a new customer before making a booking.

Each reservation at the hotel is allocated a unique reservation code. Prior to the date of the booking(s), the customer can use the web site to edit or cancel the reservation. Amendments to the booking(s) can include changing the dates of the booking, the number of guests in each room etc. During the booking process the customer can printout their reservation.

When the guest(s) arrive at the hotel the reservation number is used by the receptionist to find the reservation to check them in. At the end of their stay at the hotel, the receptionist checks the guests out. It is during this stage that the hotel system takes their payment through the credit card payment system and an invoice may be requested by the guest.

Monthly reports are prepared by the system which may be viewed on request by the Hotel Manager.

Produce a Use Case and Activity diagram for the hotel.

Answer: Use Case Diagram Link to the Use Case Diagram Picture

Use Case Diagram

Answer: Activity Diagram Activity Diagram

NEW Use Case Diagram: Link to new diagram

enter image description here

kar
  • 4,791
  • 12
  • 49
  • 74

1 Answers1

2

You are mixing actors and systems. Hotel is a system and is to be shown as a rectangle.

Sorts of room don't belong to the UC diag, if they don't suppose different functioning of the system.

Parameters and states are not to be shown as use cases. They are not ACTIONS.

As for the question in the title, the answer is no. Only you have SEVERAL UC diagrams, not a diagram. And it is OK. The activity diagram is simple enough, it even all is in one swimlane.

When you'll define all agents you'll be able to create more complex activity diagrams, with swimlanes.

Edit for second Use Case diagram:

  • Here you are trying to set the SEQUENCE of actions. Use case is not the place for it. Only Who and What, not Where, When, How. You are trying to put everything in the use case diagram. Postpone other questions to later diagrams. Look my answer here: https://stackoverflow.com/a/21408074/715269, a guy had made the opposite mistake - put everything in the Sequence diagram.
  • It is great that you thought about the registration. But Login and Registration are use cases and should be between agents, not between use cases
  • You have mixed two use cases here: one about reservation and one about real arriving/living in/leaving. Divide them.
  • Do not try to put the structure information here. Use case is to be done from the user's point of view, not from programmer's one. Don't try to decide inner problems NOW. You have to define the most common problems correctly, that's all.

I have added the part of use case diagram - reservation only.

And beware, it is NOT full yet even in the sense of actors and use cases - you must have the administration and the bookkeeping of the booking system provider, too. (if the system doesn't belong to the Hotel, of course)

enter image description here

Community
  • 1
  • 1
Gangnus
  • 24,044
  • 16
  • 90
  • 149
  • With regards to me stating Hotel as an actor, I was under the assumption that actor = "specifies a role played by a user or any other system that interacts with the subject". The subject in this case was the website booking system. Did I interpret it wrongly? – kar Jan 29 '14 at 08:55
  • There are some terms accepted already. Actors and systems together are called AGENTS. Agents are connecter through use cases. – Gangnus Jan 29 '14 at 09:05
  • Actors are people. Systems could consist of people and be represented by people, but we are thinking of them as systems in the dialogues analyzed, that's enough. – Gangnus Jan 29 '14 at 09:11
  • But I can imagine Use Case, where Actor could be a dog. Or a robot. But surely something, that has individuality, that is SOMEBODY. Systems are SOMETHING. – Gangnus Jan 29 '14 at 09:12
  • Tnks. So in this instance, can I say hotel can be held as an actor? Also as you mentioned, I have several UC diagrams instead of one. Is there any way I could work to gather them all into one? – kar Jan 29 '14 at 09:12
  • No, hotel is Agent. Hotel is System. But not Actor at any rate. But if your system works with Hotels as other systems, a hotel will use your system through different representatives. A hotel representative can be agent. If later you'll add a hotel sysadmin, you'll have a Hotel rectangle and two stick men in it. – Gangnus Jan 29 '14 at 09:15
  • If you work with hotel, it will have also its own PC with web browser or client application as a subsystem, too. And it could be important, if the information is partly stored on the client side. – Gangnus Jan 29 '14 at 09:18
  • I picture that hotel fits as a system represented as a rectangle with its 3 properties coming out of it. Just a little confused with the overall picture as to how it fits to combine all the UC diagrams. Based on the question, I don't see how they link up. Sorry too many questions bubbling. – kar Jan 29 '14 at 09:24
  • The Hotel, as any other agent, has NO properties on the Use Case level. Don't mix use case diagram - one of the highest level with Class diagram - in 99,99% of the cases really the lowest one, only Object diagram is lower and it is very rare. Class diagram elements have properties. – Gangnus Jan 29 '14 at 15:36
  • You can put properties to a note element, if you are afraid you'll forget them. – Gangnus Jan 29 '14 at 15:38
  • Sorry took a while to reply. I edited the Use case diagram and combined it into one. I intend to represent the credit card system & hotel system as a box since they don't fit as actors. Temporarily picturing them as actors cos Violet-UML interestingly doesn't have a rectangle to use. Other than these 2 systems appearing as actors, does the diagram make better sense now? Thanks so much for feedback. – kar Jan 29 '14 at 23:20
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/46415/discussion-between-gangnus-and-keshk) – Gangnus Jan 30 '14 at 09:59