STS
Software Design Specification Document (SDD)
By David M. Jones
November 16, 2014
Table of Contents
1. Introduction ……………………………………………………………………………………………… 1 1.1 Purpose ……………………………………………………………………………………… 1 1.2 Scope …………………………………………………………………………………………. 1 1.3 Definitions and acronyms …………………………………………………………… 1 2. References ……………………………………………………………………………………………….. 1 3. Decomposition description ………………………………………………………………………. 2 3.1 Module decomposition ……………………………………………………………… 3 3.2 Concurrent process decomposition ………………….………………………. 9 3.3 Data decomposition ………………………………………………………………… 10 4 Dependency description …………………………………………………………………………. 11 4.1 Intermodule dependencies ……………………………………………………… 13 4.2 Interprocess dependencies ……………………………………………………… 14
4.3 Data dependencies ………………………………………………………………….. 15 5. Interface description …………………………………………………………………….………… 16 5.1 Module description …………………………………………………………….……. 16 5.2 Process description ………………………………………………………………….. 24 6. Detailed design ……………………………………………………………………………….….….. 25 6.1 Module detailed design ………………………………………………….………. 25 6.2 Data detailed design ……………………………………………………….….…… 30
1. Introduction
1.1 Purpose
This document’s purpose is to document the set of requirements for the development of a software
management system for a bed and breakfast operation. It describes how reservations and financial
transactions are made. It also specifies the human to computer graphical user interface screens.
1.2 Scope
This Bed and Breakfast Management System enables a the automated operation of a 3 bedroom bed and
breakfast business. Customers can call the Bed and Breakfast reservation phone number and give desired
reservation dates. A staff member can check the available and give the daily price rate for each room. The
customer can provide a reservation guarantee date. The guest reservation information will be entered by
the staff member while the customer is on the phone. After the stay, there is a check out process.
Additionally the owner can generate a profit report to monitor the financial status of the operation.
1.3 Definitions
a. BBMS – Bed and Breakfast Management System
b. Reservation – A room assigned to a guest stay for a specific date range
c. Guarantee – Financial contract between the management of the bed and breakfast and a guest that
a room reservation will be available to the guest
d. Workflow – Sequential steps needed to accomplish a task
e. Domain Object – A computer entity that holds information for a given function
f. User interface – A computer graphical element that enables the user to interact with the software
g. GUI – Graphical User Interface which the method by which the user interacts with the BBMS
2. References
IEEE. Std 1016-1998 IEEE Recommended Practice for Software Design Descriptions. IEEE Computer Society,
1998.
3. Decomposition description
Entity Relationship Diagram
This describes the complete ERD for the entire BBMS. It shows the relationship between domain objects, as
shown in blue, and their services, as shown in gray.
Reservation
Check Out
Profit Report
ViewCalendar
room: Rooms reservation: Reservations setRoomId(integer): void setReservationId: void getPrice(double): void getReservedFlag(boolean): void getReservationStartDate(date):void getReservationEndDate(date):void
MakeReservation room: Rooms reservation: Reservations setReservated (boolean): void addReservation(integer): void setGuaranteed(boolean): void putGuaranteedDate(date): void putStartDate(date): void putEndDate(date): void
AddGuest reservation: Reservations guest: Guests addGuest(integer): void putFirstName(string): void putLastName(string): void putAddress(string): void putPhone(integer): void putCreditCardNumber(integer): void putCreditCartExpDate(integer): void
MakePayment
guest: Guests payment: Payments addPayment(integer): void putPaymentDate(date): void putTotalAmount(double):void putPaymentAmount(double): void getCreditCardNumber(integer): void chargePayment(double): void
PrintReport
payment: Payments getStartDate(date): void getEndDate(date): void getPaymentDate(date): void getAmount(double): void printStartDate(date): void printEndDate(date):void printProfit(double):void
Rooms
roomId: Integer roomRate: Double reserved: Boolean
ReservationId: Double
Reservations
reservationId: Integer startDate: Date endDate: Date guaranteed: Boolean guarenteeDate: Date roomId: Integer guestId: Integer paymentId: Integer
Guests
guestId: Integer lastName: String firstName: String address: String phoneNumber: Integer creditCardNumber: Integer creditCardExpDate: Integer
Payments
guestId: Intiger paymentDate: Date amountPaid: Double totalAmount: Double
CheckOut
guest: Guests reservation: Reservations payment: Payments room: Rooms displayGuests(string): void setGuestId(integer): void getAmountOwed(double): void getCreditCardNumber(integer):void chargeAmount(double): void setRoomUnreserved(boolean): void
3.1 Module decomposition
This BBMS is comprised of 4 different components, providing specific functions of the software system. The overall design has the following functions: User Interface, Services, Domain objects, and Database. The high level architectural context diagram shows how the user interface, services, and domain objects function together and how they access the database.
Architectural Context Diagram
This architectural context diagram shows the 4 contexts. The first is the user interface where staff interact
with the computer. The second is the software services used throughout the full operation of the BBMS. The
third part diagrams the data domain objects contain the data. The last part is the database that is the
software mechanism of data disk storage and retrieval.
Services
User
Interface
Domain
Objects
Database
Stores
Retrieves
Stores
Retrieves
Manages
Interacts
3.1.1 User Interface
This module contains the GUI functions of user interface. The external part of this system is the computer
monitor, keyboard, mouse. Although not part of the GUI, a printer is also an external part for printing the
profit report.
Architectural Context Diagram of the User Interface
3.1.1.1 Main Menu
This is the first user interface entity. It gives the user the choice of starting new reservations, checking out a
guest, and printing the profit report. The Reports selection that goes to the profit report is password
protected.
3.1.1.2 Calendar Lookup
This displays a calendar with room reservation days in highlighted date squares on the calendar. The room is
selected by a button. Additionally the daily price rate for the selected room is shown at the top of the
screen. Also the process interfacing with this screen will check the selected room’s guaranteed reservation
date and if it is expired, the room is marked and displayed as unreserved.
3.1.1.3 Room Reservation
This is the starting point of making a reservation. The start and end dates can be entered manually or by a
pop-up calendar button in the date boxes. The room is reserved and the user clicks the button the create
the reservation and go on the entering guest data. The reservation can be canceled with the cancel button.
3.1.1.3 Guest Information
Calendar Lookup Room Reservation Guest Information Guest Payment
Check Out
User
Interface
Main Menu
Print Report
This is where the guest name, address, and credit card information is entered. The save guest button is then
clicked to go to the next screen. If the user wishes to cancel the reservation, the cancel button is clicked and
the room is marked a unreserved.
3.1.1.4 Guest Payment
This screen is where the user enters the guest’s payment. Also if the reservation is guaranteed the
guaranteed box is clicked and the guarantee date is entered.
3.1.1.5 Finalize Payment
This screen is accessed by way of the main menu Check Out button. It lists guest names by room number.
The user clicks the desired guest name and the total amount of the customer’s bill is displayed. If there is
any balance due the finalize payment button will atomically charge that amount to the guest’s credit card. If
the is no balance due the finalize payment button only completes the stay.
3.1.2 Services
This module contains the descriptions of the services required for the data processing of the BBMS
functions. It provides output and input to the user interface and manages the domain objects. It’s functions
include looking up reservation dates for rooms, making the reservation, final checkout, and the profit report.
Architectural Context Diagram of the Services
3.1.2.1 CalenderLookup Service
This service retrieves reservation dates for a selected room and displays the start to end dates on calendar
screen. Since the user is relaying room reservation to the potential guest over the phone, the daily cost rate
is also displayed on the screen for the selected room.
3.1.2.2 MakeReservation Service
This service is used to reserve the selected room by setting the room’s reserved flag to true and creating a
reservation record. The reservation record is populated with the start and end dates. It sets the reservation
guaranteed flag and date. This service’s logic is triggered by the Create Reservation button being clicked on
the user interface screen.
3.1.2.3 AddGuest Service
This service creates a guest record and populates it with the guest’s name, address, phone number, and
credit card information. This logic is triggered by clicking Save Guest button on the user interface screen.
Clicking Cancel on that screen will set the room reserved flag to false and deleting the reservation record.
3.1.2.4 MakePayment Service
CalendarLookup
ReserveRoom
AddGuest MakePayment
CheckOut
Services
ProfitLossReport
This service makes a payment by the guest for reserving a room. When the payment amount is obtained, a
payment record is created and the guest’s credit card is charged. This logic is triggered by clicking the Make
Payment button on the screen. If the Cancel Reservation button is clicked, the room’s reserved flag is set to
false, the customer record is deleted, and the reservation record is deleted.
3.1.2.5 CheckOut Sercvice
This service is executed upon guest checkout. If there is any balance due, that amount is charged to the
guest’s credit card. It sets the room’s reserved flag to false.
3.1.2.6 ProfitReport Service
This service calculates the sum of the payment record amounts and prints the profit report.
3.1.3 Domain Objects
This module contains the descriptions of the domain objects required for the functioning of the BBMS
functions. These objects contain the data used in the 7 services.
Architectural Context Diagram of the Domain Objects
3.1.3.1 Room
This object contains the daily price rate of the room and the flag stating if it is reserved.
3.1.3.2 Reservation
This object contains the reservation information that is assigned to a room.
3.1.3.3 Guest
This object contains the guest information that is assigned to a reservation.
3.1.3.4 Payments
This object contains the payments made by a guest.
Room Reservation Guest Payments
Domain
Objects
3.1.4 Database
This module describes the software mechanism by which data in the domain objects is stored and retrieved
to the disk drive for long term storage. The database preserves the data state of the BBMS regardless of
which service is current functioning. Also if the computer is shut down for maintenance, the database allows
the BBMS to start backup with the same data state that was in the system before the shutdown.
Architectural Context Diagram of the Database
Database
Services
Domain
Objects
3.2 Concurrent process decomposition
This describes the processes from the user interface through the services to the domain objects. The
services function independently of the user. Also the services create, update, and delete the domain objects
of the BBMS.
3.2.1 Display Reservation Entity
This entity is used to display reservation dates in calendar format for a selected room.
3.2.2. Make Reservation Entity
This entity is used to make the reservation of the selected room. It creates a new reservation, new guest,
and first payment.
3.2.3 Check Out Entity
This entity is use for a selected guest to make payment of any balance due. It also sets the room the guest
stayed in to available for reservation.
3.3 Data Decomposition
This describes the software entities that contain data for the operation of the BBMS.
3.3.1 Room Entity
This entity holds data for determining if a room is available for reservation and also holds the daily rate price
of the room.
3.3.2 Reservation Entity
This entity holds the reservation data for a reserved room.
3.3.3 Guest Entity
This entity holds the guest data associated to a reserved room.
3.3.4 Payments Entity
This entity holds the payment data the a guest pays for the stay in the room.
4. Dependency Description
Data Flow Diagram
Service functions create, update, and delete domain objects which have the data stored on the disk drive by
the database mechanism.
Services
Reserve
Room
Check Out
Display
Calendar
Add Guest
Information
Make
Payment
Domain
Objects
Room
Reservation
Guest
Payments
Print profit
report
Creates
Updates
Deletes
Out: roomNumber In: roomRate In: startDate In: endDate
Out: roomNumber Out: reserved Out: guaranteed Out : guaranteedDate Out: startDate Out: endDate
Out: reservatinId Out: name Out: Address Out: CreditCard
In: name In: roomRate Out: payment
In: names Out: customerId In: totalAmount In: amountDue In: creditCard In: roomNumber Out:Reserved
In:payments Out: profitLoss
Main Menu Database
Stores
Retrieves
Stores
Retrieves
4.1 Intermodule Dependencies
There are 4 key modules of the BBMS. They are user interface, services, domain objects, and the database.
Intermodule Dependency Diagram
4.1.1 User Interface Module
This module is dependent on the service module for the user GUI operation. It is also dependent on the
domain objects for data entry and display.
4.1.2 Services Module
This module is dependent on the data that is contained in the domain objects.
4.1.3 Domain Objects Module
This module are dependent on the services to process the data contained in it.
4.1.4 Database Module
This module is dependent on the services module to store, retrieve, and delete data that is used in the
BBMS. It is also dependent on the domain objects module for the actual data that is processed in the
services module.
User
Interface
Services
Domain
Objects
Interacts
Manages
Database
Stores
Retrieves
Stores
Retrieves
4.2 Interprocess Dependencies
Interprocess Dependency Diagram
4.2.1 ViewCalendar is dependent on the MakeReservation service to display the reserved start and end
dates for a selected room.
4.2.2 AddGuest is dependent on the MakeReservation service to create a reservation record so it can update
it with the guest ID number.
4.2.3 MakePayment is dependent on the AddGuest service to get the guest ID number for the guest
payment.
4.2.4 CheckOut is dependent on the AddGuest service to get the guest name and guest ID number. It is also
dependent on the MakePayment to get any amount still owed by the guest.
4.2.4 GenerateReport is dependent on the MakePayment service to get the sum of the payments made.
ViewCalendar
room: Rooms reservation: Reservations setRoomId(integer): void setReservationId: void getPrice(double): void getReservedFlag(boolean): void getReservationStartDate(date):void getReservationEndDate(date):void
MakeReservation
room: Rooms reservation: Reservations setReservated (boolean): void addReservation(integer): void setGuaranteed(boolean): void putGuaranteedDate(date): void putStartDate(date): void putEndDate(date): void
AddGuest
reservation: Reservations guest: Guests addGuest(integer): void putFirstName(string): void putLastName(string): void putAddress(string): void putPhone(integer): void putCreditCardNumber(integer): void putCreditCartExpDate(integer): void
MakePayment
guest: Guests payment: Payments addPayment(integer): void putPaymentDate(date): void putTotalAmount(double):void putPaymentAmount(double): void getCreditCardNumber(integer): void chargePayment(double): void
PrintReport
payment: Payments getStartDate(date): void getEndDate(date): void getPaymentDate(date): void getAmount(double): void printStartDate(date): void printEndDate(date):void printProfit(double):void
CheckOut
guest: Guests reservation: Reservations payment: Payments room: Rooms displayGuests(string): void setGuestId(integer): void getAmountOwed(double): void getCreditCardNumber(integer):void chargeAmount(double): void setRoomUnreserved(boolean): void
PrintReport
payment: Payments getStartDate(date): void getEndDate(date): void getPaymentDate(date): void getAmount(double): void printStartDate(date): void printEndDate(date):void printProfit(double):void
4.3 Data Dependencies
Data dependencies are associated with the process dependencies.
Data Dependency Diagram
4.3.1 Rooms and Reservations are dependent by roomID.
4.3.2 Reservations and Guests are dependent by guestID.
4.3.3 Guests and Payments are dependent by guestID.
ViewCalendar
room: Rooms reservation: Reservations setRoomId(integer): void setReservationId: void getPrice(double): void getReservedFlag(boolean): void getReservationStartDate(date):void getReservationEndDate(date):void
MakeReservation room: Rooms reservation: Reservations setReservated (boolean): void addReservation(integer): void setGuaranteed(boolean): void putGuaranteedDate(date): void putStartDate(date): void putEndDate(date): void
AddGuest reservation: Reservations guest: Guests addGuest(integer): void putFirstName(string): void putLastName(string): void putAddress(string): void putPhone(integer): void putCreditCardNumber(integer): void putCreditCartExpDate(integer): void
MakePayment
guest: Guests payment: Payments addPayment(integer): void putPaymentDate(date): void putTotalAmount(double):void putPaymentAmount(double): void getCreditCardNumber(integer): void chargePayment(double): void
PrintReport
payment: Payments getStartDate(date): void getEndDate(date): void getPaymentDate(date): void getAmount(double): void printStartDate(date): void printEndDate(date):void printProfit(double):void
Rooms
roomId: Integer roomRate: Double reserved: Boolean ReservationId: Double
Reservations
reservationId: Integer startDate: Date endDate: Date guaranteed: Boolean guarenteeDate: Date roomId: Integer guestId: Integer paymentId: Integer
Guests
guestId: Integer lastName: String firstName: String address: String phoneNumber: Integer creditCardNumber: Integer creditCardExpDate: Integer
Payments
guestId: Intiger paymentDate: Date amountPaid: Double totalAmount: Double
CheckOut
guest: Guests reservation: Reservations payment: Payments room: Rooms displayGuests(string): void setGuestId(integer): void getAmountOwed(double): void getCreditCardNumber(integer):void chargeAmount(double): void setRoomUnreserved(boolean): void
5. Interface Description
5.1 Module Description
The module description of the interface description is a description of the user interface.
User Interface
The user interface provides the users through the use of GUI’s with the means of interacting with the BBMS
software system. The functions in the user interface gives the ability to:
1. Check the selected room available by calendar display.
2. Reserve a room.
3. Enter Guest information.
4. Guarantee a reservation.
5. Make initial payment.
6. Checkout.
a. Make final, if any, payment
b. Automatically set the room reserved flag to available
5.1.1 Main Menu
Bed and Breakfast Management System
Reservations
Check Out
Reports
5.1.2 Reservation Calendar
The reservation calendar screen presents the user with a calendar display with colored boxes for the days
that the selected room is reserved. The Previous and Next Month buttons bring the previous or next month
into the display. The Room buttons select the room to check reservations for. At the top of the screen the
daily room rate price for the selected room is displayed. If the user wants to make a reservation the Start
Reservation button is clicked, otherwise Cancel returns to the main menu.
Sun Mon Tue Wed Thu Fri Sat
1 2
8
15
22
29
9
16
23
30
3
10
17
4 5 6 7
11 12 13 14
18 19 20 21
24 25 26 27
31
28
Room 1
Room 2
Room 3
Start Reservation
Exit
< Previous Month
Next Month >
Daily room rate $120.00
5.1.3 Room Reservation Entry
Reservation Start Date
12/14/2014
Reservation End Date
12/16/2014
Room 1
Room 2
Room 3
Create Reservation
Cancel
Daily Rate $120.00
Guaranteed X Guaranteed Date 12/10/2014
5.1.4 Guest Data Entry
The guest data entry screen provides the user with the ability to enter the guest’s name, address, phone
number, and credit card information. To save the data entered, the Save Guest button is clicked. The Cancel
button returns to the main menu.
Cancel Save Guest
First Name
Last Name
Address
Phone (999)999-9999
Credit Card Number 999-999-999-9999 Expiration Date 99/99/99
5.1.5 Payment Entry
The payment entry screen display’s the guest’s name and the daily room price rate for the room. The
Guaranteed box is clicked and the guarantee date is entered if the reservation is guaranteed. The payment
amount is entered. When the Make Payment button is clicked, the guest’s credit card is charged and the
payment for that guest is stored. If Canceled Reservation is clicked the guest data is deleted from the
database, the room reserved flag for that room is cleared, and the system returns to the main menu screen.
John Smith
Daily Room Rate $120.00
Payment Amount $360.00
Make Payment Cancel Reservation
Total Amount $360.00
5.1.6 Check Out
The check out screen is displayed when the Check Out button is clicked from the main menu. A selection list
of names assigned to each room is displayed. The user clicks the guest name to check out. If there is any
balance still owed by the customer, the Finalize button will charge any remaining amount owed by the guest
to the guest’s credit card. Also when the Finalize button is clicked, the reserved flag is automatically cleared
for that room in the room database.
Guest name 1
Guest name 2
Guest name 3
Room 1
Room 2
Room 3
Total amount $999.99
Balance Due $999.99
Finalize Cancel
5.1.7 Profit Report
The profit report screen is displayed when the Reports button of the main menu is clicked. It produces a sum
of all payments made with in enter date range by month and year. When the Print button is clicked, the
report is printed on the printer. The Exit button returns to the main menu.
Starting
Month 1 2014 Year
Ending
Month 12 2014 Year
Exit
Sum of all Payments:
Month
$999,999.99
5.2 Process Description
This is the descriptions of the processes, known as services, interface with each other.
5.2.1 CalenderLookup Service
This service interfaces with the MakeReservation service to get the room is reserved or not flag from the
Rooms.
5.2.2 MakeReservation Service
This service interfaces with the AddGuest service since the added guest makes the reservation.
5.2.3 AddGuest Service
This service interfaces with the MakeReservation service since guest information is associated with the new
reservation. It also interfaces with the MakePayment service since the guest that was added makes a payent
forthereservatin.
5.2.4 MakePayment Service
This service interfaces with the AddGuest service since the added guest makes the payment for the room
reservation.
5.2.5 CheckOut Sercvice
This service interfaces with the MakeReservation, AddGuest, and MakePayment services. Since it access the
Rooms, Guests, Reservations, and Payments objects with data that was created and updated by these
services.
5.2.6 ProfitReport Service
This service interfaces with the MakePayment service. The common data object is the Payments object. The
interface occurs as payments are recorded in MakePayments and totaled in PorfitReport.
6. Detailed Design
6.1 Module Detailed Design
6.1.1 ViewCalendar Module
This module is a service that uses Room and Reservation domain objects to display reservation dates in
calendar format as well as the daily room price rate for a selected room. The module has 2 attributes that
are shown below.
1. room: This attribute holds the select room number used to get the selected room from the Rooms.
2. Reservation: This attribute holds the reservations object
The functions in this module are:
1. setRoomId(integer): This sets the room selection roomId in the rooms object to return information
on that room.
2. getPrice(double): This returns the daily rate for the selected room.
3. setReservationId (integer): This sets the reservation id index in the reservations object
4. getReservedFlag(boolean): This determines if a room is reserved or not.
5. getReservationStartDate(date): This gets the starting date of the reservation.
6. getReservationEndDate(date): This gets the ending date of the reservation.
ViewCalendar
room: Rooms reservation: Reservations setRoomId(integer): void setReservationId: void getPrice(double): void getReservedFlag(boolean): void getReservationStartDate(date):void getReservationEndDate(date):void
6.1.2 MakeReservation Module
This module is a service that reserves a room. It gets the starting date and the ending date of the
reservation. The module has 2 attributes that are shown below.
1. room: This attribute holds room data that is used to update the rooms object
2. reservation: This attribute holds the reservation data that is used to add a reservation to the
reservations object.
The functions in this module are:
1. setReserved(boolean): This sets the reserved flag to true in the rooms object.
2. addReservation(integer): This adds a reservation record to the reservation object with a reservation
id as the reservation index value.
3. setGuaranteed(boolean): This set the guaranteed flag in the reservation record of the reservation
object.
4. putGuaranteedDate(date): This puts the guaranteed date in the reservation record of the
reservation object.
5. putStartDate(date): This puts the starting reservation date in the reservation object by reservation
Id.
6. putEndDate(date): This puts the ending reservation date in the reservation object by reservation Id.
MakeReservation
room: Rooms reservation: Reservations setReservated (boolean): void addReservation(integer): void setGuaranteed(boolean): void putGuaranteedDate(date): void putStartDate(date): void putEndDate(date): void
6.1.3 AddGuest Module
This module is a service that creates and populates a guest record in the guests object. It also adds the
guestId index value in the newly created reservation record. The module has 2 attributes that are shown
below.
1. reservation: This attribute holds the reservation index id for the reservation record in the
reservations object.
2. guest: This attribute holds the guest information used to create a new guest record in the guests
object.
The functions in this module are:
1. addGuest(integer): This adds a guest record to the guests object with guestId as the index value. It
also puts the guest id in the guestId index value in the reservation record of the reservation object.
2. putFirstName(string): This puts the guest first name in the guest record.
3. putLastName(string): This puts the guest last name in the guest record.
4. putAddress(string): This puts the guest address in the guest record.
5. putPhone(integer): This puts the guest phone number in the guest record.
6. putCreditCardNumber(integer): This puts the guest credit card number in the guest record.
7. putCreditExpDate(interger): This puts the guest credit card expiration date in the guest record.
AddGuest
reservation: Reservations guest: Guests addGuest(integer): void putFirstName(string): void putLastName(string): void putAddress(string): void putPhone(integer): void putCreditCardNumber(integer): void putCreditCartExpDate(integer): void
6.1.4 MakePayment Module
This module is a service that creates and populates a payment record in the Payments object. It is indexed
by the guest id value. The module has 2 attributes that are shown below.
1. guest: This attribute holds the credit card number from the guest record to charge the payment
against.
2. payment : This attribute holds the data used to create and populate a payment record in the
payments object.
The functions of this module are:
1. addPayment(integer): This creates a payment record in the payments object with a guest id as the
index value.
2. putPaymentDate(date): This put the date the payment is made in the payment record. The date is
used for printing the profit report month and by year.
3. putTotalAmount(double): This puts the total amount owed in the payment record.
4. putPaymentAmount(douoble): This puts the payment amount in the payment record.
5. getCreditcardNumber(integer): This gets the credit card.
6. chargePayment(double): This charges the payment against the guest’s credit card.
MakePayment
guest: Guests payment: Payments addPayment(integer): void putPaymentDate(date): void putTotalAmount(double):void putPaymentAmount(double): void getCreditCardNumber(integer): void chargePayment(double): void
6.1.5 CheckOut Module
This module is a service that charges any remaining payment amount due by the guest to the guest’s credit
card. It sets the room reserved flag to false. This module has 4 attributes as shown below.
1. guest: This attribute holds the guest name and guest id for the reservation index value. It also holds
the credit card number if there is any remaining amount owed to be charged.
2. reservation: This attribute gets the room index number from the reservation object that is retrieved
by the guest id.
3. payment: This attribute holds any remaining amount to be paid by the guest.
4. room: This attribute sets the room reserved flag to false for the room record that is retrieved from
room id n the guest record.
The functions of this module are:
1. displayGuests(string): This displays all the guest names by room number for guest selection in the
GUI.
2. setGuestId(integer): This sets the guest id index value from the selected guest name in the GUI.
3. getAmountOwed(double): This gets any remaining amount still owed by the guest
4. getCreditCardNumber(integer): This executes if there is any remaining amount owed and gets the
guest’s credit card number.
5. chargeAmount(double): This executes if there is any remaining amount owed and charges it against
the guest’s cred card.
6. setRoomUnreserved(boolean): This accessed the room number indexed from the reservation record
and sets the room reserved flag to false.
CheckOut
guest: Guests reservation: Reservations payment: Payments room: Rooms displayGuests(string): void setGuestId(integer): void getAmountOwed(double): void getCreditCardNumber(integer):void chargeAmount(double): void setRoomUnreserved(boolean): void
6.1.6 PrintReport Module
This module is a service that that adds up the payments by a selection of months or by year for printing the
profit report. This module has 1 attribute as shown below.
1. payment(double): This is used to adding the payments by date for a total that is to be printed in the
profit report.
The functions of this module are:
1. getStartDate(date): This gets the starting date of payments to be totaled from the GUI.
2. getEndDate(date): This gets the ending date of payments to be totaled from the GUI.
3. getPaymentDate(date): This gets the payment date to see if the payment was made within the
range of dates selected in the profit report.
4. getAmount(double): This gets the amount of the payment made for the running total of payments
made.
5. printStartDate(date): This prints the starting date of payments included in the report.
6. printEndDate(date): This prints the ending date of payments included in the report.
7. printProfit(double): This prints the sum of all payments made within the selected date range.
PrintReport
payment: Payments getStartDate(date): void getEndDate(date): void getPaymentDate(date): void getAmount(double): void printStartDate(date): void printEndDate(date):void printProfit(double):void
6.2 Data Detailed Design
6.2.1 Room Entity
This entity is used to represent information contained in a room record of the Rooms object. It holds the
daily price rate of the room and a boolean flag used to indicate if a room is reserved or not. There are 4
attributes as shown below.
1. roomId(integer): This is the room number and is the index of the Rooms object.
2. roomRate(double): This is the daily price rate of the room.
3. reserved (boolean): This is the flag to tell if the room is reserved or not.
4. reservationId(integer): This is the reservation index id number of the reservation currently reserving
the room.
Rooms
roomId: Integer roomRate: double reserved: boolean reservationId: integer
6.2.2 Reservations Entity
This entity is used to represent a reservation of a room. It is an added record to the Reservations object. It
holds the reservation dates and guaranteed information. When a guest record is created in the Guests
object Reservations is updated with the guest ID of the guest that reserved the room. When a payment
record is created in the Payments object the payment ID is updated with the payment ID form the
corresponding payment. There are 8 attributes as shown below.
1. reservationId(integer): This is the index value of the newly created reservation record.
2. startDate(date): This is the starting date of the reservation.
3. endDate(date): This is the ending date of the reservation.
4. guaranteed(Boolean): This is the flag to tell if the reservation is guaranteed.
5. guaranteedDate(date): This is the date of the guarantee.
6. roomId(integer): This is the room number the reservation was made for.
7. guestId(integer): This is the index value of the guest ID that made the reservation from the Guests
object.
8. paymentId(integer):This is the payment index number for the payment made for the reservation
from the Payments object.
Reservations
reservationId: Integer startDate: Date endDate: Date guaranteed: Boolean guarenteeDate: Date roomId: Integer guestId: Integer paymentId: Integer
6.2.3 Guests Entity
This entity is used to represent the information of the guest who is making the reservation. There are 6
attributes as shown below.
1. guestId(integer): This is the index number if the guest record in the Guests object. It is used in the
Reservations and Payments objects.
2. lastName(string): This is the last name of the guest making the reservation.
3. firstName(string): This is the first name of the guest making the reservation.
4. address(string): This is the address of the guest making the reservation.
5. creditCardNumber(integer): This is the guest’s credit card number.
6. creditCartExpDate(integer): This is the expiration month and year of the guest’s credit card
Guests
guestId: Integer lastName: String firstName: String address: String phoneNumber: Integer creditCardNumber: Integer creditCardExpDate: Integer
6.2.4 Payments Entity
This entity is used to represent payments made by guests in the BBMS operation. There are attributes as
shown below.
1. guestId(integer): This is the ID number of the guest making the payment.
2. paymentDate(date): This is the date that the payment was made. This date is used in the
PrintReport service so a start and end range of dates can be selected.
3. amountPaid(double): This is the amount of the payment made by the guest.
4. totalAmount(double): This is the full amount the guest is to pay. It is calculated by the room rate
multiplied by the number of days in the stay.
Payments
guestId: Intiger paymentDate: Date amountPaid: Double totalAmount: Double