UNIT 2_ANSWER 8.docx - Draw the hierarchy chart and design the logic for a program that calculates the projected cost of a remodeling project Assume

# UNIT 2_ANSWER 8.docx - Draw the hierarchy chart and design...

• 2
• 100% (19) 19 out of 19 people found this document helpful

This preview shows page 1 - 2 out of 2 pages.

main program Housekeeping() detailLoop() endOfJob() Draw the hierarchy chart and design the logic for a program that calculates the projected cost of aremodeling project. Assume that the labor cost is \$30 per hour. Design a program that prompts theuser for a number of hours projected for the joband the wholesale cost of materials. The programcomputes and displays the cost of the job, which is the number of hours times the hourly rate plusthe 120% of the wholesale cost of materials. The program accepts data continuously until 0 isentered for the number of hours. Use appropriate modules, including one that displays End ofprogram when the program is finished. Hierarchy Chart: Pseudocode: Start Declarations num laborHour num costMaterial num costJob string LABOR_PROMPT = “Enter the numbers of hours worked: “ string MATERIAL_PROMPT = “Enter the cost spent on materials: “ string END_LINE = “Thank you for using this program “ housekeeping() while not laborHour=0 detailLoop() endwhile endOfJob stop housekeeping() output LABOR_PROMPT input laborHour return detailLoop() output MATERIAL_PROMPT input costMaterial costJob= (laborHour *30)+( costMaterial*1.2) output costJob
output LABOR_PROMPT input laborHour return endOfJob output END_LINE return Flowchart: housekeeping() detailLoop() endOfJob() start Declarations num laborHour num costMaterial num costJob string LABOR_PROMPT string MATERIAL_PROMPT string END_LINE stop housekeeping() ouput LABOR_PROMPT input laborHour return detailLoop() ouput MATERIAL_PROMPT input costMaterial costJob= (laborHour *30)+ ( costMaterial*1.2) output costJob return endOfJob() output END_LINE return Labor hours is 0? YES NO output LABOR_PROMPT input laborHour