No More Worries!


Our orders are delivered strictly on time without delay

Paper Formatting

  • Double or single-spaced
  • 1-inch margin
  • 12 Font Arial or Times New Roman
  • 300 words per page

No Lateness!

image Our orders are delivered strictly on time without delay

AEW Guarantees

image

  • Free Unlimited revisions
  • Guaranteed Privacy
  • Money Return guarantee
  • Plagiarism Free Writing

Design a hotel reservation system for a hotel in Abu Dhabi

A hotel in Abu Dhabi requires your services to design software for managing the hotel reservation system. The above figure provides a reservation confirmation, which can be made online or at the hotel.

You are required to do the following:

Identify the software’s use cases. Draw the UML use-case diagram and include supporting use-case description tables. At least three scenarios (each with at least two use cases) must be identified. Ensure that the include and extend relationships are added, where necessary.
Identify the objects and their respective classes from the use-case descriptions. Draw the UML class diagram and include supporting descriptions to explain the classes identified. At least 4 classes must be identified. Ensure that access specifiers are included for member visibility.
Create Python classes with the constructor, attributes (at least 5), and required setter/getter methods for all the identified classes. Identify and include other required function-headers in the classes where the function’s body is just a pass statement and include a comment to indicate what the function should achieve.
Create objects of all the identified classes and use the objects functions to populate and display all the information shown in Figure 1.

Sample Answer

To help you design a hotel reservation system for a hotel in Abu Dhabi, we’ll break down the requirements into several tasks: identifying use cases, creating UML diagrams, defining classes, and implementing Python code.

1. Use Cases Identification

Use Case Scenarios

  • Scenario 1: Online Reservation
    • Use Case 1: Search Availability
    • Use Case 2: Make Reservation
  • Scenario 2: On-Site Reservation
    • Use Case 1: Check Room Availability
    • Use Case 2: Confirm Reservation
  • Scenario 3: Cancel Reservation
    • Use Case 1: Request Cancellation
    • Use Case 2: Process Cancellation

UML Use Case Diagram

+----------------+
|   Hotel System  |
+----------------+
        ^
        |
        |
+---------------+       +-------------------+
|    Customer    |<---->|   Reservation     |
|                |      |                   |
+----------------+      +-------------------+
     ^      ^                  ^
     |      |                  |
     |      |                  |
     |      |                  |
+----+    +----+            +-----+
|Search|   |Check|          |Cancel|
|Availability| |Availability|      |
+-------------+ +------------+----+
         ^              ^
         |              |
         |              |
+----------------+   +------------------+
|Make Reservation|   |Confirm Reservation|
+----------------+   +------------------+

Use Case Description Tables

Use Case ID Name Description Actors
UC1 Search Availability Allows the customer to search for available rooms based on criteria. Customer
UC2 Make Reservation Allows the customer to make a reservation online. Customer
UC3 Check Room Availability Allows the customer to check room availability on-site. Customer
UC4 Confirm Reservation Confirms the reservation made by the customer on-site. Customer
UC5 Request Cancellation Allows the customer to request the cancellation of a reservation. Customer
UC6 Process Cancellation Processes the cancellation request and updates the system. Hotel Staff

2. UML Class Diagram

Identified Classes

  1. Customer
    • Attributes: customer_id, name, email, phone_number, reservation_list
  2. Reservation
    • Attributes: reservation_id, customer, room, start_date, end_date
  3. Room
    • Attributes: room_number, room_type, price, availability_status, amenities
  4. Hotel
    • Attributes: hotel_name, location, room_list, reservation_list, staff

UML Class Diagram

+---------------+
|   Customer    |
+---------------+
|- customer_id  |
|- name         |
|- email        |
|- phone_number  |
|- reservation_list |
+---------------+
|+ add_reservation()|
|+ cancel_reservation()|
+---------------+

+-----------------+
|   Reservation    |
+-----------------+
|- reservation_id  |
|- customer       |
|- room           |
|- start_date     |
|- end_date       |
+-----------------+
|+ confirm()      |
|+ cancel()       |
+-----------------+

+-----------+
|    Room   |
+-----------+
|- room_number|
|- room_type  |
|- price      |
|- availability_status|
|- amenities  |
+-----------+
|+ is_available()|
|+ book_room()   |
+-----------+

+---------------+
|     Hotel     |
+---------------+
|- hotel_name   |
|- location      |
|- room_list     |
|- reservation_list|
|- staff        |
+---------------+
|+ check_availability()|
|+ add_room()           |
+---------------+

Access Specifiers

  • Public (+): Methods that can be accessed from outside the class.
  • Private (-): Attributes that cannot be accessed directly from outside the class.

3. Python Classes Implementation

class Customer:
    def __init__(self, customer_id, name, email, phone_number):
        self.__customer_id = customer_id
        self.__name = name
        self.__email = email
        self.__phone_number = phone_number
        self.__reservation_list = []

    # Getters
    def get_customer_id(self):
        return self.__customer_id
    
    def get_name(self):
        return self.__name
    
    def get_email(self):
        return self.__email
    
    def get_phone_number(self):
        return self.__phone_number
    
    def get_reservation_list(self):
        return self.__reservation_list
    
    # Setters
    def set_name(self, name):
        self.__name = name

    # Placeholder methods for future functionality
    def add_reservation(self, reservation):
        pass  # This function should add a reservation to the reservation list.

    def cancel_reservation(self, reservation_id):
        pass  # This function should remove a reservation from the reservation list.


class Reservation:
    def __init__(self, reservation_id, customer, room, start_date, end_date):
        self.__reservation_id = reservation_id
        self.__customer = customer
        self.__room = room
        self.__start_date = start_date
        self.__end_date = end_date

    # Getters
    def get_reservation_id(self):
        return self.__reservation_id
    
    def get_customer(self):
        return self.__customer
    
    def get_room(self):
        return self.__room
    
    def get_start_date(self):
        return self.__start_date
    
    def get_end_date(self):
        return self.__end_date

    # Placeholder methods for future functionality
    def confirm(self):
        pass  # This function should confirm the reservation.

    def cancel(self):
        pass  # This function should cancel the reservation.


class Room:
    def __init__(self, room_number, room_type, price, availability_status, amenities):
        self.__room_number = room_number
        self.__room_type = room_type
        self.__price = price
        self.__availability_status = availability_status
        self.__amenities = amenities

    # Getters
    def get_room_number(self):
        return self.__room_number
    
    def get_room_type(self):
        return self.__room_type
    
    def get_price(self):
        return self.__price
    
    def get_availability_status(self):
        return self.__availability_status
    
    def get_amenities(self):
        return self.__amenities

    # Placeholder methods for future functionality
    def is_available(self):
        pass  # This function should check if the room is available.

    def book_room(self):
        pass  # This function should book the room.


class Hotel:
    def __init__(self, hotel_name, location):
        self.__hotel_name = hotel_name
        self.__location = location
        self.__room_list = []
        self.__reservation_list = []
        self.__staff = []

    # Getters
    def get_hotel_name(self):
        return self.__hotel_name
    
    def get_location(self):
        return self.__location
    
    def get_room_list(self):
        return self.__room_list
    
    def get_reservation_list(self):
        return self.__reservation_list

    # Placeholder methods for future functionality
    def check_availability(self):
        pass  # This function should check room availability.

    def add_room(self, room):
        pass  # This function should add a room to the room list.


# Creating objects of all identified classes and populating them with data

# Example instances:
customer1 = Customer(1, "Ali Ahmed", "[email protected]", "+971501234567")
room1 = Room(101, "Deluxe", 300, True, ["Wi-Fi", "TV", "Mini Bar"])
reservation1 = Reservation(1001, customer1, room1, "2023-10-01", "2023-10-05")
hotel = Hotel("Abu Dhabi Grand Hotel", "Abu Dhabi")

# Displaying information (using getters)
print("Customer Name:", customer1.get_name())
print("Room Type:", room1.get_room_type())
print("Reservation ID:", reservation1.get_reservation_id())
print("Hotel Name:", hotel.get_hotel_name())

Summary

This design provides an overview of a hotel reservation system through use cases, UML diagrams, class definitions, and Python implementations. Each class encapsulates properties related to customers, reservations, rooms, and hotels while adhering to object-oriented principles such as encapsulation and modularity. The placeholders indicate areas for future functionality that would need to be implemented to make the system operational.

This question has been answered.

Get Answer
PLACE AN ORDER NOW

Compute Cost of Paper

Subject:
Type:
Pages/Words:
Single spaced
approx 275 words per page
Urgency:
Level:
Currency:
Total Cost:

Our Services

image

  • Research Paper Writing
  • Essay Writing
  • Dissertation Writing
  • Thesis Writing

Why Choose Us

image

  • Money Return guarantee
  • Guaranteed Privacy
  • Written by Professionals
  • Paper Written from Scratch
  • Timely Deliveries
  • Free Amendments