0% found this document useful (0 votes)
3 views2 pages

Program GuestBookingSystem

The GuestBookingSystem is a program designed for managing hotel bookings at Tranquil Shores Hotel. It allows guests to input their details, including name, stay duration, membership level, and residency status, to calculate the final price with applicable discounts. The program tracks the number of guests and remaining rooms until the hotel is fully booked.

Uploaded by

tequangreen354
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Program GuestBookingSystem

The GuestBookingSystem is a program designed for managing hotel bookings at Tranquil Shores Hotel. It allows guests to input their details, including name, stay duration, membership level, and residency status, to calculate the final price with applicable discounts. The program tracks the number of guests and remaining rooms until the hotel is fully booked.

Uploaded by

tequangreen354
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

program GuestBookingSystem;

var
MaxRooms, RemainingRooms, GuestCount, RoomID, StayDuration: Integer;
BaseRateResident, BaseRateNonResident, FinalPrice, Discount: Real;
CustomerName, BookingDate, MembershipLevel, Nationality, ResidencyInput: String;

const
USD_TO_JMD = 155.00;
JMD_BASE_RATE = 15500.00;
USD_NON_RESIDENT_RATE = 200.00;
DISCOUNT_PLATINUM = 0.10;
DISCOUNT_GOLD = 0.05;
DISCOUNT_SILVER = 0.03;
DISCOUNT_BRONZE = 0.02;
EARLY_BOOKING_DISCOUNT = 0.15;

begin
MaxRooms := 200;
RemainingRooms := MaxRooms;
GuestCount := 0;
BaseRateResident := JMD_BASE_RATE;
BaseRateNonResident := USD_NON_RESIDENT_RATE * USD_TO_JMD;

writeln('Welcome to Tranquil Shores Hotel - Experience Comfort and Luxury');

while RemainingRooms > 0 do


begin
writeln('Enter guest''s full name:');
readln(CustomerName);

writeln('Enter the length of stay (in days):');


readln(StayDuration);

writeln('Enter the reservation date (format: YYYY-MM-DD):');


readln(BookingDate);

writeln('Select membership type (Platinum, Gold, Silver, Bronze):');


readln(MembershipLevel);

writeln('Are you a Resident or Non-Resident?');


readln(ResidencyInput);

RoomID := MaxRooms - RemainingRooms + 1;


RemainingRooms := RemainingRooms - 1;
GuestCount := GuestCount + 1;

if LowerCase(ResidencyInput) = 'resident' then


FinalPrice := BaseRateResident * StayDuration
else
FinalPrice := BaseRateNonResident * StayDuration;

if BookingDate < '2023-09-09' then


Discount := EARLY_BOOKING_DISCOUNT
else
begin
case LowerCase(MembershipLevel) of
'platinum': Discount := DISCOUNT_PLATINUM;
'gold': Discount := DISCOUNT_GOLD;
'silver': Discount := DISCOUNT_SILVER;
'bronze': Discount := DISCOUNT_BRONZE;
else
Discount := 0;
end;
end;

FinalPrice := FinalPrice * (1 - Discount);

writeln('Booking Confirmation');
writeln('=====================');
writeln('Guest: ', CustomerName);
writeln('Room Number: ', RoomID);
writeln('Total Nights: ', StayDuration);
writeln('Final Price: $', FinalPrice:0:2, ' JMD');
writeln('------------------------------');

writeln('Total Guests Registered: ', GuestCount);


writeln('Available Rooms: ', RemainingRooms);
end;

writeln('Hotel fully booked. Thank you for choosing Tranquil Shores!');


end.

You might also like