|
SquidSoft Inc. - GUIDOs
Detailed Design Document - Process Specifications |
|
Process 3: Product List Purpose: Allow user to add, delete, modify, print, find, and sort product(s). Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm: if (getMenuChoice() == "Add Product") && (user_has_access) then Add Products Interface if (getMenuChoice() == "Delete Product") && (user_has_access) then Delete Porduct Interface if (getMenuChoice() == "Print") then Print Product Interface if (getMenuChoice() == "Find") then Find Product Interface if (getMenuChoice() == "Sort By") then Sort By Interface if (getMenuChoice() == "Exit") then return to main menu else NO ACTION
![]() As mentioned before, this button can only be accessed by warehouse manager, since only warehouse manager can be able to add product. When the user click the add button, a blank line will be appear at the end of the table above so a new product can be added. The new product information will save in the data base automatically when the user finish adding. If an error is detected in the input such as invalid format of UPC or a negative value of unit cost or size. Purpose: Allow user to add new product into the data base. Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm:
if inputs from user are syntactically correct then
product[UPC] := UPC
product[description] := description
product[category] := category
product[unit cost] := unit cost
product[bulk unit size] := bulk unit size
Send product to the data store to be added
if data store reportedsuccess then
print_to_user 'ok'
else
print_to_user 'Product is already in the data base'
endif
else
print_to_user `Syntax error in input(s)
endif
return to the interface allow user to choose other
option or go back to main menu
![]() This button is also can only be accessed by the warehouse manager. The user need to use the mouse to highlight the product that he or she want to delete. Then click the delete button. A dialog box will come up to reconfirm the user that the product to be delete is correct. If it is correct, the user has to click yes or delete. If the user want to cancel the delete process, just click cancel to bring the user back to the Product Available Interface. Once the product is deleted, it cannot be retrieved in any way. Purpose: Allow user who has high enough security level to delete product in the data base. Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm:
if inputs from user is syntactically correct then
read the product record
if product is on order or some remainins in stock then
report to user 'need to delete them first' and exit
else
delete the instance product from the data base
endif
endif
![]() This function can only be accessed by manager level of security. Update product function simply let the user to modify the production information in the data base. There can only one product to be modify at a time. UPC can not be changed. Purpose: Allow user who has high enough security level to modify product information. Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm: get UPC, description, category, unit cost and bulk size from user if those inputs are syntactically correct then product[UPC] := UPC product[description] := description product[category] := category product[unit cost] := unit cost product[bulk unit size] := bulk unit size Send product to the data store to be modified else report error to user and exit
![]() This button can be accessed by any level of security. When this button is clicked, the table in the current order will be printed. This button will be linked to the system print manager. Purpose: Allow any security level user to print production information. Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm: if input from mouse are syntactically correct then read the record from the data base print the record else report error to the user endif
![]()
Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm:
if the inputs are syntactically correct then
if user want to find product under UPC then
search product from data base with the same UPC
report to the user
report 'not found' to user if the product not found
elseif under description
search product(S) from data base with same description
report 'not found' to user if product(s) not found
elseif under category
search product(S) from data base with same category
report 'not found' to user if product(s) not found
elseif under unit price
search product(S) from data base with same unit price
report 'not found' to user if product(s) not found
else
no action
endif
else
no action
![]()
Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm:
if the inputs are syntactically correct then
if sort by UPC then
sort the Products data base by UPC in ascending order
report the data base(table) to user
elseif sort by description then
sort Products database by description in ascending order
report the data base(table) to user
elseif sort by category then
sort Products database by description in ascending order
report the data base(table) to user
elseif sort by cost price then
sort Products database by description in ascending order
report the data base(table) to user
else
no action
else
no action
![]() Purpose: Allow user to exit the Product Interface Process and go back to the Main Menu Process. Inputs:
Outputs:
Calls:
Called by:
Error conditions:
Algorithm: if the inputs are syntactically correct then load up the main menu interface else no action endif |
|
![]() |
This site created and maintained with Mortar |