October 18, 2011
Ray Panko gives this exercise as a test for the accuracy of spreadsheet development; in his tests he found 62 errors in 150 spreadsheet solutions (some spreadsheets contained more than one error), which he finds is typical of spreadsheet users—hopefully professional programmers make fewer errors:
You are to build a spreadsheet model to help you create a bid to build a wall. You will offer two options — lava rock or brick. Both walls will be built by crews of two. Crews will work three 8-hour days to build either type of wall. The wall will be 20 feet long, 6 feet tall, and 2 feet thick. Wages will be $10 per hour. You will have to add 20% to wages to cover fringe benefits. Lava rock will cost $3 per cubic foot. Brick will cost $2 per cubic foot. Your bid must add a profit margin of 30% to your expected cost.
Your task is to write a program that prompts the user for input of the various parameters—wall dimensions, crew days, rock cost, and so on—and prints a neat calculation of the bid price for the wall. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.
Pages: 1 2