0% found this document useful (0 votes)
2 views

PATExampleB

The document outlines a hotel booking program designed for both lower and higher income households, allowing users to book rooms based on their preferences and budget. It includes features for user login, room selection, and admin functionalities for managing bookings and room details. The program has specific limitations, such as not processing credit card payments and restricting bookings to a maximum of 18 months in advance.

Uploaded by

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

PATExampleB

The document outlines a hotel booking program designed for both lower and higher income households, allowing users to book rooms based on their preferences and budget. It includes features for user login, room selection, and admin functionalities for managing bookings and room details. The program has specific limitations, such as not processing credit card payments and restricting bookings to a maximum of 18 months in advance.

Uploaded by

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

SCENARIO AND SCOPE

TOPIC:

The topic that the program is based on, is a hotel that can be booked by the public. It allows people to book
for a hotel that considers the lower and higher income households. The audience that my program targets are
people that are seeking for a hotel that meets their needs and makes their stay worthwhile and allows them
to book rooms that are available and meet their price range and conditions

PURPOSE OF PROGRAM:

It allows people to book for a hotel that comes with various package deals (such as package deals that consist
for family, budget, luxury or suit deals that future clients may be interested in) which considers the lower and
higher income households.

POSSIBLE SOLUTION:

The program will request for the user to login with his/her login details(their username and password) or sign
up(new username and password) if they do not have an account, the program will
details (check-in-date, check-out-date, payment type or personal details they have in listed) and their price
range and it allow the client to filter their search to find the best possible rooms that meet their conditions
that they have inputted and allow them to select a room they would like to book out for their time period.

The admin will need to login with the set login in details that is needed to receive accesses to admin functions.
The admin will be allowed to edit details (check-in-date, check-out-
date, payment type or personal details they have in listed) or edit various rooms offered by the hotel, such as
their style (luxury, suit, budget etc) and bedroom count. They will also be able to remove any rooms in the
, any bookings by clients or any login details of current client

SCOPE:

The program will not be able to process any bookings that are paid on credit or will not allow the
user to book a room(s) more than 18 months in advance.

USER REQUIREMENTS

USER 1:

Role The client will book an available room

Activity They will be able to sign up (inserting a


new username and a password) or login
into their account (by inserting their
username and password). They will
complete a booking by inserting their
personal details (name, surname,
contact number), select their payment
choice and set their check-in-date and
check-out-date. The client will also input
their conditions they would like for the
room they would like to book in the filter
search (such as a certain price range per
night or containing room serves) and
there after selecting their room that they
would like to book out.
Limitations The client will not be able to edit, add or
remove any room options from the
database or remove any existing login
accounts of other clients.

USER 2:

Role The administration will do the


background maintenance of the
program.
Activity The administration must login with the
set login details to access the admin
functions. The admin will be able to add,
edit (such as edit the room type and the
bedroom count for a specific room),
search through or remove any room

administration will also add, edit(edit


usernames and passwords), search
through or remove any login details of
existing or past client's account.
Limitations The administration will not be able to
make any changes, add or remove any
package deals that are available to the
clients.
DATA STRUCTURES

DATABASE DESIGN:

TABLE 1: TBLBOOKINGS

DESIGN VIEW

DATA SHEET VIEW

TABLE 2: TBLHOTEL

DESIGN VIEW
DATA SHEET VIEW

CLASS DESCRIPTION AND DIAGRAM:

CLASS DESCRIPTION:
Class will consist of the following methods and what is the purpose of each method:
method will be used to calculate what will the total price of the room will cost
the client per night. The total price will depend on the style type the client has booked out and
the number of bedrooms the room comes with because each room added on is additional R250 to
the original amount for the room and the original amount will depend on the style type the room
is (such as a luxury room is R1000, and family room is R750). Example: style type = family and
bedrooms = 4 therefor it is R750 + (R250 x 4) = R1750 per night.

method will be used to calculate whether the client qualifies for discount and if so,
how much discount will be taken off the final amount. If the client pays with cash the client will
receive no discount however if the client pays with card

total.

edit(redBookingDetails) with the client's booking details so that the client can see if all the
information he/she has inputted is correct and he is satisfied to continue with the program.

edit(redSummaryPage) with the client's booking details and room details (like a bill at the end of
a resturant night consisting with everything. Example the tip and the food prices) so that the
client can see if all the information he/she has inputted is correct and he is satisfied with his final
booking.

Service will be used to determine whether the client qualifies for room service or room
service plus personal service at any given time of the day, which this method will c
method to see if the client qualifies for special service (5 days will qualify for a room service plus
personal service at any given time of the day), and this will be used to determined they type of
service the client will receive.

client qualifies for a standard


breakfast or luxuries breakfast,
qualifies for a luxuries breakfast (3 days will qualify for a luxuries breakfast), and this will be
used to determined they type of service the client will receive.

days the client has booked out and this


method will be used to help determine other methods.

CLASS DIAGRAM:
THotel
- FStyle : string;
- FBedroom : integer;
- FPayment : Boolean;
- FName : string;
- FSurname : string;
- FContactNumber : string;
- FCheckInDate : string;
- FCheckOutDate : string;
- FBreakfast : boolean;
- FService : boolean;
- FRoom : integer;
- FDays : integer;
+ PricePerNight(pStyle : string; pBedrooms : integer): real;
+ Discount(pPayment : Boolean): real;
+ ToStringBookingDetails : string;
+ ToStringRoomDetails : string;
+ Service(pDays : integer): boolean;
+ Breakfast(pDays : integer): boolean;
+ Days(pCheckOutDate, pCheckInDate : string): integer;
+ Constructure THotel.create(pName, pSurname, pContactNumber, pCheckOutDate, Commented [KA2]: Constructor
pCheckInDate, pStyle : string; pPayment, pBreakfast, pServes : boolean; pBedroom, pRoom, This is too much trim it down.
pDays : integer);

TEXT FILES AND ARRAYS:

TEXTFILE

DESCRIPTION OF HOW IT WILL BE USED IN THE PROGRAM:


The text file will be used in the following ways in the program; store user s unique auto ID which
will be linked to the tblbookings database, stores username and password that will link
their booking details on the database, which will allow the user to access them in the future with
their username and password. The text file will be used to store the date of the last time the user
logged in to his/her account. This will allow the admin user to see when last this user has visited
the hotel booking page on their account.

FORMAT OF TEXTFILE:
Format = ID_Username_Password _LastLogin(2024/03/12)
Example = 11_1Annette1_Wing7Attack_2024/03/16

ARRAYS:

DESCRIPTION OF HOW IT WILL BE USED IN THE PROGRAM:


The Arrays will be used for the following procedures; edit such as their
username and password, adjust the login in date of user, search for a particular user's login
details, add in a new user to the text file with their own username and password,
login username and password from the text file or write array to the text file such as mentioned
above a new user with their username and password.

HOW ARRAYS WILL BE PROCESSED:


The arrays will be processed to validate the data inputted by the user that matches their
previous login data, such as their username and password.

The arrays will be also processed to edit, remove or insert any new usernames and passwords or
existing passwords and usernames. The arrays will also be used to search for a particular user to
access their login information such as their username, password or when last the user logged into
their account.
NAVIGATION
Commented [KA3]: This will be date, not string
DATA PROCESSING WHAT

Process 1: It will allow the user to use his/her login details to log in.

Search through array to find username and password entered

Process 2: Loop through textfile to load usernames and passwords into parallel
arrays
Process 3: The program will calculate 5% of the price per night and deduct it from the
original price per night, if the user pays with card.
Process 4: The program will determine whether the client will receive breakfast and
service depending on the room style they have paid for. (Reason: certain
style rooms come with additional features such as if the client books a suit
it will come with service and breakfast)
Process 5: The program will calculate the number of days the user has booked out for.

Process 6: The program will calculate whether the client qualifies for a standard
breakfast or luxuries breakfast depending on the number of days they
have booked (only qualifies for breakfast if they meet requirements in
process 4).

Process 7: The program will calculate whether the client qualifies for room serves or
room serves plus personal serves at any given time of the day, depend on
the number of days they have booked. (only qualifies for breakfast if they
meet requirements in process 4)

Process 8: The program will calculate the price of the room per night, and it will
depend on the chosen room style and how many bedrooms they wish to
book. (Reason: certain rooms have different prices per night (example: a
luxury room standard fee for the night is R1000) and the number of
bedrooms the room will come with is additional R250 per bedroom and will
be added on the total price) (more information on this process is in the
class description)

DATA PROCESSING HOW

Algorithm 1:
If chkPaymentType = Cash then
Showmessage = Client does not qualify for discount
else
IFinalPrice = PricePerNight - (PricePerNight / 100 * 5)
Algorithm 2:
username in the Array) AND (Password = Clien the
Array) then
bValid = True
Logs into account
Else
bValid = false
Showmessage = Clients login details are incorrect
Algorithm 3:
If sStyle = Budget then
Begin
iCost = 500
iPricePerNight = iCost + (iBedroom * 250)
End

If sStyle = Family then


Begin
iCost = 750
iPricePerNight = iCost + (iBedroom * 250)
End

If sStyle = Luxury then


Begin
iCost = 1000
iPricePerNight = iCost + (iBedroom * 250)
End

If sStyle = Suit then


Begin
iCost = 1250
iPricePerNight = iCost + (iBedroom * 250)
End
Algorithm 4:
If sStyle = Budget then
Begin
bBreakfast = No
bServes = No
End

If sStyle = Family then


Begin
bBreakfast = No
bServes = Yes
End

If sStyle = Luxury then


Begin
bBreakfast = Yes
bServes = Yes
End

If sStyle = Suit then


Begin
bBreakfast = Yes
bServes = Yes
End
DATA OUTPUT

SCREEN 1 SCREENSHOT:

Output Format Output Component


Description Example of format
Name, Format is spread neatly underneath each other
surname,
Example.
contact number,
check-in-date, Name: Annette
check-out-date Surname: De Kock
and payment
type. Contact Number: 02323451234
redBookingDetails
Check-In-Date: 2024/04/29
Check-Out-Date: 2024/04/31
Payment Type: Card

SCREEN 2 SCREENSHOT:
Output Format Output Component
Description Example of format
Name, Format is spread neatly underneath each other redSummaryPage
surname,
Example.
contact number,
check-in-date, Name: Annette
check-out-date Surname: De Kock
and payment
type. Contact Number: 02323451234
Check-In-Date: 2024/04/29

(This rich edit Check-Out-Date: 2024/04/31


will contain the Payment Type: Card
booking details
from the
previous rich
edit and the
new room
details (which is
underneath
this))
(Similar to the
bill slip when
you pay once
you done eating
at the
restaurant.
Including
everything such
as the tip, food
prices, name of
restaurant,etc )
Hotel name, Format is spread neatly underneath each other
location, room Hotel Name: Bari
number, type,
bedrooms and Location: 33 Jacaranda Street, Northcliff,
extra features Sandton
Room Number: 12
Type: Luxury
Bedrooms: 1
RichEdit
Breakfast: Included
Service: Included
Price: R1250/night

You might also like