Explore BrainMass

# Please write a pseudo-code for the following problems

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

Part 1:

Write pseudo-code for the following problem:

You have a file containing sporting goods that are sold online. Each item record contains the item id, item name, item description, item category, item price, and the units in stock. If the category of the item is either "tennis" or "golf", then the price will be discounted by 15%. If the category of the item is "soccer", then the price will be discounted by 10%. For all of the other categories, the original price remains as is. If the number of units in stock is below 50, the item will be marked on the web site as "out of stock". Your part of the program is responsible for listing all of the items.

Part 2:

Think of scenarios when you would use a) a while-loop, b) a do-until loop, c) a for-loop. Write one pseudo-code example for each.

#### Solution Preview

Part 1:

Write pseudo-code for the following problem:

You have a file containing sporting goods that are sold online. Each item record contains the item id, item name, item description, item category, item price, and the units in stock. If the category of the item is either &#8220;tennis&#8221; or &#8220;golf&#8221;, then the price will be discounted by 15%. If the category of the item is &#8220;soccer&#8221;, then ...

\$2.49