Software design architecture
Lab Task 10
06th Jan ‘25
SUBMITTED TO:
Sir Farhan Sarwar
Software Engineering Department
SUBMITTED BY:
Abiha Hameed(088/Fa22/BSSE-B)
Here is the complete solution for "Modelling and Designing an Advanced Hotel Management
System Using UML Diagrams":
Step 1: Identify Classes and Relationships
Key Classes and Attributes
1. Guest
o Attributes: guestID, name, contactInfo, email
o Methods: viewRoomAvailability(), bookRoom(), checkIn(), checkOut(), re
questService()
2. Room
o Attributes: roomID, type, price, status
(available/occupied/maintenance)
o Methods: updateStatus(), getDetails()
3. Booking
o Attributes: bookingID, guestID, roomID, checkInDate, checkOutDate
o Methods: createBooking(), cancelBooking(), updateBooking()
4. Service
o Attributes: serviceID, type (room service/laundry), status
(requested/completed), cost
o Methods: requestService(), completeService()
5. Staff
o Attributes: staffID, name, role, schedule
o Methods: viewGuestSchedules(), updateRoomStatus(), manageServiceRequ
ests()
6. Admin
o Attributes: adminID, name, privileges
o Methods: generateReport(), addRoomDetails(), updateRoomPricing()
Relationships
• Booking “has-a” Guest and Room.
• Service “is-requested-by” Guest.
• Admin and Staff inherit from Employee (inheritance).
Step 2: UML Class Diagram:
Step 3: UML Object Diagram:
Step 4: UML Diagrams
Use Case Diagram:
Sequence Diagram:
Step 5: Implementation
Code (Example in Java)
Booking Module
class Booking {
private int bookingID;
private int guestID;
private int roomID;
private String checkInDate;
private String checkOutDate;
public Booking(int bookingID, int guestID, int roomID, String checkIn, String checkOut) {
this.bookingID = bookingID;
this.guestID = guestID;
this.roomID = roomID;
this.checkInDate = checkIn;
this.checkOutDate = checkOut;
public void createBooking() {
System.out.println("Booking created successfully.");
Service Module
class Service {
private int serviceID;
private String type;
private String status;
public Service(int serviceID, String type) {
this.serviceID = serviceID;
this.type = type;
this.status = "Requested";
public void completeService() {
this.status = "Completed";
System.out.println("Service completed successfully.");
Outcome
This solution includes:
1. UML Class Diagram for system structure.
2. UML Object Diagram for a specific scenario.
3. Use Case and Sequence Diagrams for system behavior.
4. Partial Java implementation of the Booking and Service modules.