Electrical and Computer Engineering
26 of 29
UAH
CPE 112
Compute Dimensions
and Costs
•Set lengthOfWood = (length + width) * 2
•Set canvasWidth = width + 5
•Set canvasLength = length + 5
•Set canvasAreaInches = canvasWidth * canvasLength
•Set canvasAreaFeet = canvasAreaInches/144.0
•Set totWoodCost = lengthOfWood * woodCost
•Set totCanvasCost = canvasAreaFeet * canvasCost
•Set totCost = totWoodCost + totCanvasCost