Management Module Specs


The documented modules are:

  • 5.3.2 Delete Credit Card
  • Pseudo Code:
      Display dialog box
      Wait for OnClick message
      Get string from dialog box
      Check for duplicate string
      if( duplicate )
      {
           remove string from database.
      }
      Exit funciton
      
      
  • 5.4.1 Modify Tax Rate
    • Called by:
      • TAX (sub-menu)
    • Calls:
      • Take_Floating_input
      • Modify_Rate
    • Calling Sequence:
      1. 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. )
      2. 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.
    • Psuedo Code:
      	Display a dialog box and ask the user for a tax rate
      	if the user hit cancel
      		return to main menu
      	else 
      	  Call Take_Floating_input
      	  if tax is valid
      		Call Modify rate
      		if tax rate is successfully modified in data base
      			it will just return to main menu
      		else
      			return an error message said
      			fail to modify tax rate in data base
      		end_if
      	  else /* tax rate is negative number */
      		the dialoge box will be re-prompt
      		and ask the user re-enter or cancel
      	  end_if
      	end_if
      
  • 5.4.2 Modify GST
    • Called by:
      • TAX (sub-menue)
    • Calls:
      • Take_Floating_Input
      • Modify_Rate
    • Calling Sequence:
      1. 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. )
      2. 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.
    • Psuedo Code:
      	Display a dialog box and ask the user for a GST
      	if the user hit cancel
      		return to main menu
      	else 
      	  Call Take_Floating_input
      	  if GST is valid
      		Call Modify rate
      		if GST is successfully modified in data base
      			it will just return to main menu
      		else
      			return an error message said
      			fail to modify GST in data base
      
      		end_if
      	  else /* tax rate is negative number */
      		the dialoge box will be re-prompt
      		and ask the user re-enter or cancel
      	  end_if
      	end_if
      
  • 5.5.1 Add Fee
    • Called by:
      • FEE
      Calls:
      • Get_Item_Number
      • Search_item_number
      • Get_Fee_Description
      • Get_Fee
      • Add_Fee
    • Calling Sequence:
      1. 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)
      2. 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)
      3. 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 )
      4. Take_Floating_input (it will get the fee and check whether it is valid or not))
      5. 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.
    • Psuedo Code:
      	Display a dialoge box and ask the user input item number,
      	fee description and fee
      	call Get_item_Number to get the item number
      	if item number is valid
      	   Call Search_item_number
      	   if item_number exist
      		Call_Fee_Description
      		if correct syntax
      		    Call Take_Floating_input
      		    if fee is valid
      			Call Add_Fee
      		        if fee is successfully add to data base
      			   retun to main menu
      			else
      			   return an error message
      			   "Falie to add in Data base"
      			end_if
      		    else /* fee is not valid */
      			return an error message
      			"Invalid Fee"
      		    end_if
      		else /* incoorect syntax for fee description */
      		    return an error message
      		    "Incorrect syntax for Fee description"
      		end_if
      	   else
      		return an error message
      		"Item number doesn't exist"
      	   end_if
      	else 
      	   return an error message
      	   "Invalid item number"
      	end_if
      
  • 5.5.2 Delete Fee
    • Called by:
      • FEE
      Calls:
      • Get_Item_Number
      • Search_item_number
      • DELE_Fee
    • Calling Sequence:
      1. 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)
      2. 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 )
      3. 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.
    • Psuedo Code:
      	Display a dialoge box and ask the user input item number,
      	fee description and fee
      	call Get_item_Number to get the item number
      	if item number is valid
      	   Call Search_item_number
      	   if item_number exist
      		Call Dele_Fee
      		if delete fee from the data base is succes
      			return to main menu
      		else
      			return an error message
      			"Fail to delete fee from the data base"
      		end_if
      	   else
      		return an error message
      		"Item number doesn't exist"
      	   end_if
      	else 
      	   return an error message
      	   "Invalid item number"
      	end_if
      
  • 5.5.3 Modify Fee
    • Called by:
      • FEE
    • Calls:
      • Get_Item_Number
      • Search_item_number
      • Take_Floating_input
      • Modify_Fee
    • Calling Sequence:
      1. 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)
      2. 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)
      3. Take_Floating_input (it will take the modify fee as input and also check the syntax)
      4. 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.
      • Psuedo Code:
        	Display a dialoge box and ask the user input item number,
        	fee description and fee
        	call Get_item_Number to get the item number
        	if item number is valid
        	   Call Search_item_number
        	   if item_number exist
        		Call Take_Floating_input
        		if fee is valid
        		   Call Modify_Fee
        		   if attemp success to modify fee in data base
        			 retun to main menu
        		   else
        			 return an error message
        			 "Falie to make modification in Data base"
        		   end_if
        		else /* fee is not valid */
        		   return an error message
        		   "Invalid Fee"
        		end_if
        	   else 
        	        return an error message
        	        "Item number does not exist"
        	   end_if
        	else
        		return an error message
        		"Invalid item number"
        	end_if
        
  • 5.6.1 Add Employee
    • Called by:
      • Employee Sub-Menu
    • Calls:
      • Get new employee info.
      • Verify employee's info.
      • Re-enter password to confirm
    • Calling Sequence:
      1. Get new employee info.
      2. Verify employee's info.
      3. 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.
    • Pseudocode:
      Display new employee ID in corresponding ID text box 
      (auto generated by the program)
      if the input Employee found in data store "Employees" 
        report "ID already exists" in pop up mesg box 
        go back to the text box and re-enter the ID 
      endif
      Get new employee First name into First Name text box
      Get new employee Last name into Last Name text box
      Select one of the security type form the Security Type's list box
      Get new password into password text box
      Varify the password by asking user to re-enter it in a InputBox 
      if (new_password != old_password)
        Display "Wrong Password" in mesg box
        Attemp to re-enter new password
      endif
      If Click_Cancel
        cancel the process at anytime.
      endif
      If Click_Add
        confirm add
      
  • 5.6.2 Modify Employee
    • Called by:
      • Employee Sub-Menu
    • Calls:
      • Modify Employee
      Calling Sequence:
      1. Get employee ID
      2. Verify employee ID
      3. 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.
    • Pseudodcode:
      Pop Up an Input Box and ask user to input Employee ID number
      If the input from the manager is syntactically incorrect
        report this problem
      else
        if the input Employee ID is not found in "Employees"
          report "record not found"
          re-enter the Employee ID or cancel the process
      endif
      Change employee ID text box if needed
      Change employee First Name if needed
      Change employee Last Name if needed
      Change employee security type if needed
      Change password if necessary
      If Click_Cancel
        cancel the process
      Endif
      If Click_Modify
        confirm modify
      Endif
      
  • 5.6.3 Delete Employee
    • Called by:
      • Employee Sub-Menu
    • Calls:
      • Get employee ID
      • Verify employee ID
      • Delete employee
    • Calling Sequence:
      1. Get employee ID
      2. Verify employee ID
      3. 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.
    • Pseudocode
      Pop Up an Input Box and ask user to input Employee ID number
      If the input from the manager is syntactically incorrect
        report this problem
      else
        if the input Employee ID is not found in "Employees"
          report "record not found"
          re-enter the Employee ID or cancel the process
      endif
      Display Employee ID in the corresponding text box
      Display Employee Last name in the corresponding text box
      Display Employee First Name in the corresponding text box
      Display Security type in he corresponding list box
      If Click_Cancel 
        cancel the process if needed
      endif
      If Click_Delete
        confirm delete
      Endif
      
  • 5.7.1 Add Security Type
    • Called by:
      • Security Sub-Menu
    • Calls:
      • Get new security type / security name
      • Verify the security type
    • Calling Sequence:
      1. Get new security type / security name
      2. 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.
    • Pseudo Code:
      Get new security type in corresponding text box
      If input are syntactically incorrect
        report this problem by error mesg box
        re-enter to get new security type
      endif
      Get new security name in corresponding text box
      If Click_Cancel
        Stop process 
      Endif
      If Click_Add 
        Confirm process
      Endif
      
  • 5.7.2 Modify Security Type
    • Called by:
      • Employee Sub-Menu
    • Calling:
      • Modify Employee
    • Calling Sequence:
      1. Get security type
      2. Verify security type
      3. 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.
    • Pseudo Code
      Get security type from input box
      If security type not in data store "Security"
        report this problem in mesg box
        re-enter the security type
      Display security type in corresponding text box
      Display security name in corresponding text box
      Change security name if needed
      If Click_Cancel
        stop the process
      Endif
      If Click_Modify
        confirm the process
      Endif
      
  • 5.7.3 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:
      1. Get security type
      2. Verify security type
      3. Verify the existing security with employees
      4. 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"
    • Pesudo Code
      Get security type from input box
      If security type not in data store "Security"
        report this problem in mesg box
        re-enter the security type
      Display security type in corresponding text box
      Display security name in corresponding text box
      If Click_Cancel
        stop the process
      If Click_Delete
        If (security_type in "Employee")
          report this problem in mesg box
          cancel the process
        Else
          confirm the process
        Endif
      Endif