Friday, August 23, 2019

Pseudocode Standards Essay Example | Topics and Well Written Essays - 500 words

Pseudocode Standards - Essay Example Every ‘Store’ object would comprise of the store id, name, its location, phone number, distance from the current station.   The ‘Stores’ array at each station would already be sorted according to the lowest distance. Every ‘Store’ object would comprise of the store id, name, its location, phone number, distance from the current station.   The ‘Stores’ array at each station would already be sorted according to the lowest distance. In order to avoid invalid entry by a customer, the station would present the customer with a fixed list of categories to choose the item from. When the customer selects an item from the list, a local search is conducted within the array ‘Items’ of the local database. In case of a match and if the available quantity is greater than 0, the information is presented to the customer. In case no match is found, the item is searched in the ‘Items’ array of the nearest remote store loc ation i.e. on the server of the first store in the ‘Stores’ array. The search continues for all the stores in the array. Information is presented only if the item exists in a particular store. A while loop is used to traverse through all records of items and stores, while the matching conditions are checked through the if-statements. Step 1: Display MenuStep 2: Get Item Name from CustomerStep 3: Match Item name with Items in Local StoreStep 4: In case Item available  Step 5: Print Message â€Å"Available†Step 6: Print Quantity of Item AvailableStep 7: In case Item unavailable at Local Store Step 8: Match Item Name with Items in Nearest Store Step 9: In case Item Available Step 10: Print Message â€Å"Available†.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.