Question
Design and create a program for the ULM Coffee Shop to provide some customer market research data. When a customer places an order, a clerk
Design and create a program for the ULM Coffee Shop to provide some customer market research data. When a customer places an order, a clerk asks for the customers zip code and age. The clerk enters that data as well as the number of items the customer orders. The program operates continuously until the clerk enters a 0 for zip code at the end of the day. When the clerk enters an invalid zip code (more than 5 digits) or an invalid age (defined as less than 5 or more than 105), the program reprompts the clerk continuously until a valid entry is made. When the clerk enters fewer than 1 or more than 12 items, the program reprompts the clerk two more times. If the clerk enters a high value (greater than 12) on the third attempt, the program accepts the high value, but if the clerk enters a negative value on the third attempt, an error message is displayed, and the order is not processed further (not counted and not accumulated). At the end of the program, display a count of the number of items ordered by customers from the same zip code as the coffee shop (71209) and a count from all other zip codes combined. Display the overall average customer age. Additionally, display the total counts of the number of items ordered by customers under 30 and by customers 30 and older.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started