Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please solve. Show IPO charte and Desk-check. Thanks in advance. Treyson Liu has

ID: 3869850 • Letter: P

Question

Please solve. Show IPO charte and Desk-check.

Thanks in advance.

Treyson Liu has just purchased his first home. His local flooring store is having a great sale, and he would like to replace the tile floor in his rectangular den with carpeting. He wants a program that calculates and displays the cost of the carpeting. Complete an IPO chart for this problem. Desk-check the algorithm using 25 feet as the length, 30 feet as the width, and $5.65 as the cost per square foot of carpeting, respectively. Then desk-check it using your own set of data.

Explanation / Answer

Input - Width of room - 30 feet
        Height of room - 25 feet
        Cose of crpeting per square foot - $5.65


Processing - Algorithm
             Generating the required area
             Calculating the total cost


Output --- Total Cost of carpeting


Desk Checking - Proving the correctness of the algorithm manually

               Area of carpetting = Length * Breadth (It is rectangular in shape)
                                  = 25 * 30
                                  = 750 Sq ft

                Cost of per square carpetting - 5.65
                Total Cost = 5.65 * 750 (This is the alorithm we are using)
                           = $4237.5