Explore BrainMass
Share

Please write a pseudo-code for the following problems

This content was STOLEN 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.

© BrainMass Inc. brainmass.com October 24, 2018, 6:02 pm ad1c9bdddf
https://brainmass.com/computer-science/pseudocode/please-write-a-pseudo-code-for-the-following-problems-28992

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 “tennis” or “golf”, then the price will be discounted by 15%. If the category of the item is “soccer”, then ...

$2.19
See Also This Related BrainMass Solution

Analyzing a grading problem and writing pseudo code

Write a grading program that helps to determine your letter grade based on your exam score. For example, when you put in exam score of 80, the program will determine you get a B. Please note the following:

1) Your letter will be determined by only one exam score.
2) The program will keep on prompting you to put more scores until you hit the E button on your keyboard.
3) The scoring standard:

A) 90 - 100
B) 80 - 89
C) 70 - 79
D) 60 - 69
F) Below 60

Analyze this problem, and write a pseudo code based on your analysis.

View Full Posting Details