Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Scenario Granny's Ice-cream Delight is a startup ice-cream and pastry store that caters to the needs of everyone who has a sweet tooth. They specialize

Scenario Granny's Ice-cream Delight is a startup ice-cream and pastry store that caters to the needs of everyone who has a sweet tooth. They specialize in Ice-cream, and Donuts. They intend to increase their menu offering in the near future, but for now is limiting its offerings to these options. It is anticipated that there will be a maximum of 100 sales per menu item each day. You have been tasked to write a C program, primarily using one dimensional arrays and various control structures and basic C programming concepts, to help the owners keep track of certain aspects of the business's daily sales activities. Your program should satisfy the following requirements: 1. Display a welcome message to the user. [1 mark] 2. Display a menu to the user, showing the options for ice-creams and pastries available. The menu should not give the user the option to stop processing. At the end of the day, the manager should be able to enter a secret value of -99999 for a menu option, which will cause the program to generate a summary of the day's sales activity and close the program. Otherwise, the menu should always be displayed [3 marks] 3. If the customer chooses to buy Ice-cream, there is a base price of $250.00 per scoop. So, you must find out: - how many ice-creams the customer wants to purchase, and how many scoops the customer wants in total. (Breakdown of scoops per ice-cream in not needed) For each Ice-cream sale, the program should do the following: [2 marks] - Store the number of scoops in an array called scoopsSold[100] [2 marks] Store the number of ice-creams sold in that sale in an array called creamsSold[100] [2 marks] - Keep track of the number of ice-cream sales (You will need this information later). [1 marks] Calculate the customers total payment due and display their bill correct to 2 places of decimal. Store the total sale amount for each ice-cream sale in an array called iceCreamSales[100], and return to the menu. [3 marks] - [2 marks] 4. If the customer chooses to buy Donuts, the donut prices go by size. A 3-inch donut sells for $150.45, a 4-inch donut sells for $175.50, and a 6-inch monster donut sells for $350.00 For each donut sale, the program should: - [2 marks] Store the size of the donut sold, in an array called donutSizes[100] Get the number of donuts the customer wants to buy. Store the transaction sale amount, in an array called donutSales [100] [2 marks] Keep track of the number of donuts sold. [1 mark] Display the customer's bill correct to two places of decimal and return to the menu. [2 marks] 5. At the end of the day the manager will enter the secret value of -99999 for a menu option, at which time the program is to calculate and display the following information: For Ice-cream a. The total number of Ice-creams sold for the day. [2 marks] b. The average ice-cream sale amount per transaction [5 marks] [5 marks] C. The average number of scoops sold per sale. d. The total Ice-cream sale amount for the day. [5 marks] [5 marks] For Donuts e. The average size of the donuts sold for the f. The total donut sale amount for the day. [5 marks]

in c# only use 1 dimensional array and control structure

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions