Mis 505 Homework Week 2 Pg. 88 #5 a

365 Words2 Pages
MIS 505 Homework Week 2 pg. 88 #5 A 5 a. Draw the hierarchy chart and then plan the logic for a program for the sales manager of The Couch Potato Furniture Company. The manager needs a program to determine the profit on any item sold. Input includes the wholesale price and retail price for an item. The output is the item's profit, which is the retail price minus the wholesale price. Use three modules. The main program declares global variables and calls housekeeping, detail, and end-of-job modules. The housekeeping module prompts for and accepts a wholesale price. The detail module prompts for and accepts the retail price, computes the profit, and displays the result. The end-of-job module displays the message “Thanks for using this program”. DetailLoop() DetailLoop() Main Main EndofJob() EndofJob() HouseKeeping() HouseKeeping() Main Start CALL HouseKeeping CALL DetailLoop CALL EndofJob Stop HouseKeeping() Start STRING WORD = house STRING Word = “Enter Random Word:” OUTPUT Word INPUT randomWord Return DetailLoop() Start String Left = Flipforward String Right = Flipbackward randomWord = Word If randomWord is > Word then Left Else If randowmWord is < Word the Right endif Return EndofJob() Start OUTPUT Define Word Return INPUT NAME | DESCRIPTION | DATA TYPE/LENGHT | randomWord | Target word ‘house’ | String | | | | | | | | | | WORK AREA NAME | DESCRIPTION | DATA TYPE/LENGHT | | | | OUTPUT NAME | DESCRIPTION | DATA TYPE/LENGHT | Word | Enter random word | String | Flipforward | Word not on page, flip forward | String | Flipback | Word not on page, flip backward” | String | Define Word | Read definition | String | Left | Flip 1 page backward | Number | Right | Flip 1 page forward | Number |

More about Mis 505 Homework Week 2 Pg. 88 #5 a

Open Document