Urgent 1-- 7 hours

profilestudystudent
1.pdf

Exercise#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”.

a. Hierarchy chart:

main program

housekeeping() detail () end-of-Job ()

This study source was downloaded by 100000790156070 from CourseHero.com on 05-16-2021 09:51:01 GMT -05:00

https://www.coursehero.com/file/11972401/1/

Th is

stu dy

re so

ur ce

w as

sh ar

ed v

ia C

ou rs

eH er

o. co

m

b. Flowchart:

Start

Decleration Num wholesale_price Num retail_price Num profit String Wholesale_Prompt = “Enter the Whole Sale Price:” String Retail_Prompt = “ Enter the Retail Price :” String Last_Line = “Thanks and have a nice day ”

housekeeping()

detail()

end-of-job()

Stop

houskeeping()

output Wholesale_Prompt

intput wholesale_price

return

detail()

output Retail_Prompt

input retail_price

profit = retail_price – wholesale_price

output profit

return

end-of-job()

return

output Last_Line

This study source was downloaded by 100000790156070 from CourseHero.com on 05-16-2021 09:51:01 GMT -05:00

https://www.coursehero.com/file/11972401/1/

Th is

stu dy

re so

ur ce

w as

sh ar

ed v

ia C

ou rs

eH er

o. co

m

c. Pseudocode:

start

Declarations

num wholesale_price

num retail_price

num profit

string Wholesale_Prompt = “Enter the wholesale price”

string Retail_Prompt = “Enter the retail price”

string last_Line = “Thanks and have a nice day”

housekeeping()

detail()

end-of-job()

stop

housekeeping()

output Wholesale_Prompt

input wholesale_price

return

detail()

output Retail_Prompt

input retail_price

profit = retail_price – wholesale_price

output profit

return

end-of-job()

output Last_Line

return

This study source was downloaded by 100000790156070 from CourseHero.com on 05-16-2021 09:51:01 GMT -05:00

https://www.coursehero.com/file/11972401/1/

Th is

stu dy

re so

ur ce

w as

sh ar

ed v

ia C

ou rs

eH er

o. co

m

Powered by TCPDF (www.tcpdf.org)