Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When an item is sold, or when new stock is received from a supplier, its instock value must be updated. The process searches for the item and, if found, simply prompts for the updated value, storing it as the new instock quantity. A more time-consuming version might have the user enter the quantity of an item and specify whether it is being sold or restocked, updating instock accordingly.
pseudocode for quantity update…
read in code value sought
apply the hash function to obtain the location
if not found
write out 'Item not present'
else
write out code, name, instock value
prompt for new quantity and read it in
set instock to new value
endif