Question: In this lab you will write a program in Clanguage for a flower and candy shop. Ask the user whether they want a flower bouquet,

 In this lab you will write a program in Clanguage for

In this lab you will write a program in Clanguage for a flower and candy shop. Ask the user whether they want a flower bouquet, a candy box, or both. Define a struct for flower and a struct for candy. The flower structure must contain the flower name, flower quantity and the price of each flower. The candy structure must contain the candy name, candy quantity, and the price of one piece of candy. Depending on the answer provided by the user prepare the flower bouquet and/or the candy box. The bouquet will simply be an array of flower items and the candy box will simply be an array of candy item. Write the flowing functions to support your program: 1. void make Bouquet(flower bouquet[], int length, float " price) 2. woid showBouquet(flower bouquet[], int length) 3. woid makeCandyBox((candy box[], int length, float * price) 4. void showCandyBox( (candy box[], int length) Save the struct and function definitions in a file shop.h. In another file name shop.c provide functionality for this methods. In your main file you can call it gift shop.c include these files as appropriate and then ask the user whether they want a flower bouquet, a candy box, or both. Depending on their answer call the appropriate methods and display the total price of their purchase. A sample run is as follows: Please choose from the following options : . Only Bouquet 2. Only CandyBox 3. both How many flowers do you want in your boquet : 3 Please enter the name of the flower: rose Please enter the price of one flower: 2.55 How many rose do you want: 3 Please enter the name of the flower: lilly Please enter the price of one flower: 2.45 How many lilly do you want: 2 Please enter the name of the flower: Daisy Please enter the price of one flower: .78 How many Daisy do you want: 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!