Examples A Hotel Management System Superb Hotels Group plc. There are many hotels in the Superb Hotels group. Each hotel has a distinct name eg Superb Kensington, Superb Harrogate, Superb Cleckheaton. Each hotel handles its own room reservations, arrivals, departures and cancellations. Each hotel is built to a standard design and has 40 bedrooms and 5 function rooms. Every room (whether it be a bedroom or a function room) has a room number and may be currently occupied or unoccupied. All rooms can be booked by customers. A booking may involve a number of guests and more than one room but will be associated with exactly one customer's name. A function room may be occupied by a large number of guests. Each bedroom can accommodate 1 or 2 people. The tariff (charge) per night for a bedroom depends on its type - there is a single bedroom rate and a double bedroom rate. The hotel reception staff will sometimes need to check on : the number of beds in a specified bed whether a bedroom or function room is currently occupied The hotel keeps a number of Overhead Projectors (OHPs) for use in function rooms. It is sometimes necessary to place an OHP in a function room or to remove it. The hotel will wish to keep track of whether a function room currently has an OHP in it or not. Use Case Diagram • Actors & Use Cases • A Customer – Make a booking (check the booking details to work out the invoice total) – Cancel a booking (but must still pay if it’s a late cancellation) • A Guest – Arrive and check in (check the booking to make sure the guest is booked in) – Depart and check out ( and pay for any damages) • A Manager – Check if a room is currently occupied – Check whether a function room has an OHP located in it – Install an OHP – Remove the OHP from a room As check booking details is confirming different information, depending on whether the customer is paying (i.e how much) or whether a guest is checking in (i.e is this guest on the booking) this suggest that 2 separate use cases may be better. Make Booking Check If Room Occupied Customer Cancel Booking <<Extends>> Check for OHP Manager Pay for Booking <<Uses>> Install OHP Check Booking Detail Remove OHP <<Uses>> Check In Guest <<Extends>> Check Out Pay for Damages Classes • Hotel • Hotel Name • Operation1, Operation2, Handle Arrival, Handle Departure, Handle Reservation, Handle Cancellation, check No: of Beds, Check If Occupied • Tariff • Functional Room • Capacity, Has OHP • Check Fore OHP, Remove OHP, install OHP • Room • Room No:, is Occupied • Check If Occupied • Bedrooms • No: of Beds • Check No: of Beds, vacate, occupy • Guest • Guest Name • OHP • OHP No: • Booking • Start Date, No: of Days • Customer • Customer Name • Party The hotel keeps a number of Overhead There are many hotels in the Superb Hotels group. Projectors (OHPs) for use in function Each hotel has a distinct name eg Superb Kensington, Superb 1 rooms. 0..1 Harrogate, Superb Cleckheaton. It is sometimes necessary to place an Each hotel handles its own room reservations, arrivals, departures and cancellations in a function room or to remove it. OHP The hotel will wish to keep track of whether a function room currently has an OHP in it or not. Each hotel is built to a standard design and has 40 bedrooms and 5 function rooms. Every room (whether it be a bedroom or a function room) has a room number and may be currently occupied or unoccupied. 1..* 0..* 1 1..* All rooms can be booked by customers. The tariff (charge) per night for a 0..1 1 bedroom depends on its type - there is a single bedroom rate and a double bedroom rate. 0..1 occupies A booking may involve0..2 a number of 1 guests and more than one room but will party be associated with exactly one A function room may be occupied by a customer's name. large number of guests. Happy Holiday Homes Happy Holiday Homes is an organization, which lets out holiday cottages to the general public. One of its general principles is to be as flexible as possible with its customers. An example of its flexibility is that it allows customers to book cottages for arbitrary durations, not simply multiples of one week. Some facts about the organization: 1. It owns no properties, but lets properties on behalf of their owners 2. Happy Holidays have a catalogue giving information about the properties. 3. It collects income from holiday lettings and passes on a 55% share to owners 4. Properties may be provisionally booked by phone until the arrival of a 10% deposit. 5. Deposits must arrive within 7 days of a provisional booking being made. 6. The balance must be paid 14 days before a let is taken up. 7. Some customers make block (multiple) bookings. 8. Completed booking information is stored (archived) for analysis purposes. Library example Student Record System A student record system is used by an institution which offers a computer engineering (BCE), Electronics Engineering (EE) and Telecom Engineering (TE) program. Each program is offered over a period of four years and in each year of the program a number of subjects are offered. Each subject has a name, number and semester in which it offers. Each subject is assessed by examination (midterm & final term) and by some assignments/quizzes or a combination of the two. Each subject is led by a lecturer and may be supported by several other lecturers or TAs. Each lecturer/TA has name, employment number and department. We need to record the marks for each student and for any completed subjects whether they have been passed or not. Assess assignment/Quizzes Offer courses <<uses>> Institution <<uses>> Teacher Offer Subjects Teach Subject Assign subject Assess Examination Request for Course Support Courses TA Student Request for Subject View Result Classes • Institution • Course • Year • Module – Complete Module • Lecturer • Student • Assessment – Assessment Component • Exam • Course Work – Marks Institution 1 1 Course 4 Year 1 comprises HasNowCompleted 0..* Structure Is offered on 2..* 1 1 Leads 0..* Lecturer enrolled Student 1 Supports 0..* 1 Is Award 1 1..* Assessment 1 0..* result 1..* 1 Is it perfect? Roadway Transport Company Roadway Transport Company Roadway Transport Company rents the vehicle in three categories. Luxury Cars, Passenger Cars and Buses. Luxury cars and Buses can only be rented with drivers provided by the renting office but passenger cars can be taken without drivers. The rent of Luxury cars and Buses should be paid before taking them to the rent but it is optional for the passenger cars to pay the rent before taking them to for rent. Car and Bus owners can register their luxury, passenger cars and buses to the rent office. Each owner will be assigned a registration ID. Each customer will be assigned Renting ID. Only passenger cars can be taken for weekly and monthly rents. Customer can refresh the renting status through phone by telling his Renting ID.