PROGRAM DESCRIPTION
WOW!! Talk about hard work paying off! With the expertise at property planning you have demonstrated, someone noticed and your dreams have come true: This Old House TM has decided to help you build your dream home! You can’t believe your great fortune! In fact, Steve Thomas is in the back yard right now, filming a segment on your pool excavation: Norm is inside installing some custom window moldings; Rich is supervising the installation of the plumbing for your new spa; and Tom is haggling with the hardwood floor contractor to all of it for free. Your pinch yourself to make sure it rally isn’t a dream, but stop when you remember that you promised your 8-year old twins that you would help them set up their “business”. You see, there are so many workers on site, and even more gawkers passing by the construction site, lured by the sight of the TOH trailers and t-shirts, that the twins, taking after your example of hard work and dedication, have decided to turn this into a profit-, making venture: a lemonade stand. You promised them that you would write a very cool program to track all their sales, so let’s get to it – Steve may even make it a segment on the Saturday show!
SPECIFIC DIRECTIONS
Start by printing an introduction message, then begin asking for sales data. You know the twins are planning to offer several different items at their lemonade stand: Lemonade, in three different cup sizes; various types of cookies; and TOH t-shirts. Steve has even gotten into the act: some of the t-shirts have been autographed, and the twins plan to sell these at a higher price than the “old plain” ones. (Of course, not all the autographed ones will be sold!)
You need to gather data on every sale as it occurs, and help with the pricing. For example, you’ll present a menu of whatever is to be sold, wait for one of your entrepreneurs to enter what the current customer is buying, process the individual sale, then accumulate totals for the final printout of how successful the day has been. (You might be wondering: how will I accomplish all or this? The twins will be using your laptop at the stand to run your program!)
Use the following function in your design for this particular program. If you wish to use more, that’s OK, as long as you include these as well.
main: As usual
print_menu: Prints a menu of items for sale on screen. Your menu should allow for the following selections: lemonade, cookies, t-shirts, or quit.
get_cup_size: Ask for which size of lemonade cup the customer wants, Three sizes are available: 8,12, and 16 ounce.Return the requested size.
cup_price: Input the cup size and it returns the price.
get_cookie_type: Asks for and returns which type of cookie the customer wants. The twins plan to sell Chocolate Chip, Sugar, and Peanut butter. Do this with a cookie menu: don’t forget make them type in the name!
get_shirt_type: Asks for and returns whether the customer wants an autographed or non-autographed t-shirt.
shirt_price: Input the shirt type and it returns its price.
You’ll need to test the operator’s selection to make sure it’s valid, in case someone enters the wrong item. Just loop and get a menu input until the user enters a valid selection.
Lemonade: The charge for cups of lemonade depends on cup size (no refills).
8 ounce: 50¢;
12 ounce: 75¢;
16 ounce: $1.00;
Cookies: The price of cookies is the same for all: 75¢.
T-Shirts: Non-autographed shirts: $4.00. Autographed t-shirts: $8.00. (Since they were provided for free by the show, the twins thought they better not ask for too much.
For each sale, print out what item is being sold and its price. Continue to accept sales until the operator wants to quit – somehow we’ll ensure that we never run out of stuff to sell! Then print out the following summary information:
total number of customers
total ounces of lemonade
total number of each type of cookie sold
total number of autographed t-shirts and number of non-autographed t-shirts
total revenue for the day
Your results should be laid out in a business-like, columnar report – you want to give the twins a good example of proper record keeping! A dull list of results is clearly not a good example!
You may accumulate and print all of your totals in the main function.

