Management Module Specs
The documented modules are:
Add Room
Delete Room
Modify Room
Add Room Type
Delete Room Type
Modify Room Type
Add Credit Card
Delete Credit Card
Modify_Tax_Rate
Modify GST
Add Fee
Delete Fee
Modify Fee
Add Employee
Modify Employee
Delete Employee
Add Security Type
Modify Security Type
Delete Security Type
Add Room
Called By:
Management Menu
Calls:
Get Room Number
Get Room Type Name
Calling Sequence:
Get New Room Number
Verify Room Number
Get Room Type Name
Verify Room Type Name
Add Information to Room Data Store
Inputs:
new room number
room type name (ie: deluxe, single)
Outputs:
confirmation that it was added properly
Errors:
Room Number already exists
Syntax of Room Number is Invalid (ie: not a number)
Room Type Name doesn't exist yet
Delete Room
Called By:
Management Menu
Calls:
Get Room Number
Calling Sequence:
Get Room Number
Check to see that room exists
Make sure no one is currently booked in room, and in future
Make sure no room service either
Remove from data store
Inputs:
Room Number
Outputs:
Confirmation of deletion
On error a message stating who is booked in the room currently.
Errors:
Room Number doesn't exist
Room is actually booked
Add Room Type
Called By
Management Menu
Calls:
Get Room Type
Get Room Rate
Calling Sequence:
Get Room Type Name
Verify Room Type Name
Assign Room Type
Get Room Rate
Verify Room Rate
Add to data store
Inputs:
Room Type Name
Room Rate
Outputs:
Confirmation that it was added correctly
Errors:
Room Type Name already exists
Syntax Error on Room Type Name
Room Rate Syntax Errors (ie: not a number)
Delete Room Type
Called By:
Management Menu
Calls:
Get Room Type Name
Delete Room
Calling Sequence:
Get Room Type Name
Verify Room Type Name
Check to see if Rooms still exist of this type
If so, delete those rooms that exist?
Inputs:
Room Type Name
Outputs
Confirmation that it was successful
A list of rooms that were removed from database also.
Errors:
Syntax Error for Room Type Name
Room Type Name doesn't exist
Modify Room Type
Called By:
Management Menu
Calls:
Get Room Type Name
Get Room Rate
Calling Sequence:
Get Room Type Name
Verify Room Type Name
Get Room Rate
Verify Room Rate
Update data store
Inputs:
Room Type Name
New room rate
Outputs:
Confirmation
Errors:
Room Type Name doesn't exist
Syntax errors on Room Type Name
Syntax errors on Rom Rate
Description:
This function should only occur during a certain time otherwise the invoicing will get messed up for people who are currently booked.
Modify Room
Called By:
Management Menu
Calls:
Get Room Number
Get Room Type Name
Calling Sequence:
Get Room Number
Verify Room Number
Get Room Type Name
Verify Room Type Name
Make changes
Inputs:
Room Number
New Room Type Name
Outputs:
Confirmation
Errors:
Syntax of Room Number
Room Number doesn't exist
Room Type Name doesn't exist
Room is currently booked thus unchangeable currently
Desciption:
As here invoices could be modified by accident for a client and should be used with care also.
Add Credit Card
Called by:
Management
Calls:
NONE
Calling Sequence:
Get a string from user. This is the Credit Card type they wish to add.
Check if it exists already, if it does displays an error message.
Adds the string to the credit card type table in the database.
Input:
String (The credit card type)
Errors:
ALLOCATED The string already exists in the table.
BLANK The user attempted to add a blank string.
Output:
Displays a dialog box informing the user of success or failure.
Description:
The function adds a credit card type to the database it then informs the user if it was successful or if there was a problem with the string.
Delete Credit Card
Called by:
Management
Calls:
NONE
Calling Sequence:
User selectes the string from a listbox.
User is then prompted with an "are you sure" dialog to give them a chance to avoid deleting the string from the database.
On a yes the string is deleted from the table in the database.
A dialog box is displayed informing the user of the results of their actions.
Input:
Button click (credit card name is selected by the user)
Errors:
NONE
Output:
Dialog box feed back on results of user action.
Description:
This functions allows the user to select a credit card name and the removes it from the database.
Modify Tax Rate
Called by:
TAX (sub-menu)
Calls:
Take_Floating_input
Modify_Rate
Calling Sequence:
Take_FLoating_Input - (it will check whether the tax rate is valid or not if not it will ask the user input again or cancel to return to main menu. )
Modify_Rate - (it will take two input one is the new tax rate, one is flag to indicate whether it is modify Tax or GST. It will update the tax rate in the data base)
Input:
TAX Rate
Output:
no visible output, new tax rate will be updated in the Data Base
Errors:
syntacically incorrect input(s)
Description:
It provide a way for the user change the tax rate once the tax rate has been changed. It calls one function to get the tax rate and check whether the tax rate is correct syntax or not. If a proper tax rate has been inputed, it will automatically update the tax rate in the data base.
Modify GST
Called by:
TAX (sub-menue)
Calls:
Take_Floating_Input
Modify_Rate
Calling Sequence:
Take_Floating_Input (it will check whether the tax rate is valid or not if not it will ask the user input again or cancel to return to main menu. )
Modify_Rate (it will take two input one is the new tax rate, one is flag to indicate whether it is modify Tax or GST. It will update the GST in the data base)
Input:
GST
Output:
no visible output, new GST will be updated in the Data Base
Errors:
syntacically incorrect input(s)
Description:
It provide a way for the user change the GST once the GST has been changed. It calls one function to get the GST and check whether the GST is correct syntax or not. If a proper GST has been inputed, it will automatically update the GST in the data base.
Add Fee
Called by:
FEE
Calls:
Get_Item_Number
Search_item_number
Get_Fee_Description
Get_Fee
Add_Fee
Calling Sequence:
Get_Item_Number (it will take the item number as input and check whether it is valid or not, if not it will return an error message)
Search_item_number (this function will search the item number from the data base. if the item number is already exit, then return an error message and return to main menu)
Get_Fee_Description (it will also check the syntax of the description, if incorrect syntac, then it will return an error message and return to main )
Take_Floating_input (it will get the fee and check whether it is valid or not))
Add_Fee (it will add fee into data base)
Input:
item number
fee description
fee
Output:
New fee item will be added into Data Base
Errors:
syntacically incorrect input(s)
Description:
It provide a way for the user to add a new fee item into the data base. It calls four functions to get the item number, fee description and fee, then it will verify those input. If correct, it will search the item is alrady exit or not. if not, it will be added into data base.
Delete Fee
Called by:
FEE
Calls:
Get_Item_Number
Search_item_number
DELE_Fee
Calling Sequence:
Get_Item_number (it will take the item number as input and check whether it is valid or not, if not it will return an error message)
Search_item_number (this function will search the item number from the data base. if the item does exit, then delete the fee, otherwise return a proper error message for the user )
DELE_Fee (it will delete fee from the data base)
Input:
item number
Output:
no visible output, the fee item will be deleted in the Data Base
Errors:
syntacically incorrect input(s)
Description:
It provide a way for the user to delete a fee item from the data base. It calls two functions to get the item number, then it will verify input. If correct, it will search the item is exit or not. if yes, it will be deleted from data base.
Modify Fee
Called by:
FEE
Calls:
Get_Item_Number
Search_item_number
Take_Floating_input
Modify_Fee
Calling Sequence:
Get_Item_Number (it will take the item number as input and check whether it is valid or not, if not it will return an error message)
Search_item_number (this function will search the item number from the data base. if the item number does exit, the Fee will be modified)
Take_Floating_input (it will take the modify fee as input and also check the syntax)
Modify_Fee (it will modify the fee in the data base)
Input:
item number
new fee
Output:
new fee item will be updated in Data Base
Errors:
syntacically incorrect input(s)
Description:
It provide a way for the user to modify fee into the data base. It calls three functions to get the item number and fee, then it will verify those input. If correct, it will search the item is alrady exit or not. if yes, it will update into data base.
Add Employee
Called by:
Employee Sub-Menu
Calls:
Get new employee info.
Verify employee's info.
Re-enter password to confirm
Calling Sequence:
Get new employee info.
Verify employee's info.
Re-enter password to confirm
Input:
employee ID
employee first name
employee last name
security type
password
Ouput:
Instance of "employee" to be added to the data store "Employees"
Errors:
Syntactically incorrect input(s)
Employee ID is already in use
Description:
Add a new employee into the Employee data store. It calles add_employee to add a new instance of employee information. It returns an error message if the employee ID already exist, or a successfull message.
Modify Employee
Called by:
Employee Sub-Menu
Calls:
Modify Employee
Calling Sequence:
Get employee ID
Verify employee ID
Get new name/password/security type
Input:
employee ID
employee first name
employee last name
security type
password
Output:
(None)
Errors:
Syntactically incorrect input(s)
Employee ID not in used
Description:
Change the information about an employee. It calls a function to get the employee ID and verify it. If the employee ID does exists, the user can update the information about that employee specified by the employee ID. It returns an error message if the ID doesn't exist in the data store. Otherwise it returns a successfull message in the screen.
Delete Employee
Called by:
Employee Sub-Menu
Calls:
Get employee ID
Verify employee ID
Delete employee
Calling Sequence:
Get employee ID
Verify employee ID
Delete employee
Input:
employee ID read from the data store "Employees"
Output:
Instance of "employee" to be deleted from the data store "Books"
Errors:
Syntactically incorrect input(s)
Employee ID not in used
Description:
Delete a employee information from the data store "Employees". It calles a function to get the employee ID. If the employee ID does exists, the specific employeed record will be deleted from the data store "Employees". Otherwise it'll return a error message saying the employee not exist.
Add Security Type
Called by:
Security Sub-Menu
Calls:
Get new security type / security name
Verify the security type
Calling Sequence:
Get new security type / security name
Verify the security type
Input:
security type
security name
Ouput:
Instance of "security" to be added to the data store "Security"
Errors:
Syntactically incorrect input(s)
Security Type is already in use
Description:
Add a new security type into the security data store. It calles add security to add a new instance of security type with number and name. It returns an error message if the security type already exist.
Modify Security Type
Called by:
Employee Sub-Menu
Calling:
Modify Employee
Calling Sequence:
Get security type
Verify security type
Get new security name
Input:
security type
security name
Output:
(None)
Error:
Syntactically incorrect input(s)
Security type not exist
Description:
Change the security name of a security type. It calls a function to get the information about a security type by given the specific type#. If the security type does not exist it will return a error message. Otherwise the security name can be changed.
Delete Security Type
Called by:
Security Sub-Menu
Calls:
Get security type
Verify security type
Verify the existing security with employees
Delete security
Calling Sequence:
Get security type
Verify security type
Verify the existing security with employees
Delete security
Input:
security type
read from the data store "Security"
Output:
Instance of "security" to be deleted from the data store "Security"
Error:
Syntactically incorrect input(s)
Security type not exist
Description:
Delete a existing security type from the data store "Security". It calles a function to get the security type. If the security type# does not exist, it'll return a error message. Next it'll check if the security type is still in used by any employees. If yes, return a error message, otherwise the record with the specific security type will be deleted from the data store "Security"