Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop a C programming based on this question QUESTION: Viral Cookies is a small company producing Hari Raya cookies every year. Their famous cookies are
Develop a C programming based on this question
QUESTION: Viral Cookies is a small company producing Hari Raya cookies every year. Their famous cookies are Tart Nenas, Kuih Kapit and Tart Coklat. This year the company has collected cookies orders from customers starting June until July. The company hires you to develop a program to produce a monthly cookies order report which includes the list of customers, the list of cookies orders, the list of payment for each customer orders and the total order for each cookie. The cookies are sold at RM30.00, RM18.00 and RM28.00 for Tart Nenas. Kuih Kapit and Tart Coklat respectively. Table 1 shows the sales price for three cookies. Table 1 Cookies name Sales price Tart Nenas RM30.00 RM18.00 Kuih Kapit Tart Coklat RM28.00 Currently the company has compiled the list of June orders. The order list is in Figure 1 and the monthly order report example is in Figure 2. You must implement structure, queue and appropriate programming techniques. The program will have the following functions: i. addOrderInput() The function will ask input from the user. Then, it will add the order to the queue. Figure 3 shows the process of the function during runtime. generate Report The function will produce a report as shown in Figure 2. It will use a dequeue process to produce the report. Besides that it will calculate the total payment and count the total order for Tart Nenas, Tart Coklat and Kuih Kapit. The report output can be seen in Figure 3. ii. iii. maino The main function will call the above functions sequentially. The example of inputs and outputs flow of the program is in Figure 3. Tart Coklat NN 3 Order for month : June Customer Tart Nenas Kuih Kapit Cik Mah 2 1 Cik Ani 1 2 Cikgu Ann Cikgu Zul 3 Cikgu Burn 2 2 Nora 1 1 Makcik R Cikgu Mat Hajah Ros 2 Hajah Teh Figure 1 NINI 2 1 3 1 4 4 4 Kuih Kapit 1 Order for month: June Customer Tart Nenas Cik Mah 2 Cik Ani 1 Cikgu Ann 3 Cikgu Zul Cikgu Burn 2 Nora 1 Makcik R Cikgu Mat Hajah Ros 2 Hajah Teh 4 NOONOWN NOO Tart Coklat 2 2 0 0 2 1 3 1 4 4 Payment(RM) 134.00 122.00 126.00 54.00 152.00 76.00 84.00 100.00 190.00 232.00 Total Tart Nenas : 15 Total Kuih Kapit : 16 Total Tart Coklat : 19 Total Payment : RM 1270 Figure 2 Which month order? June How many orders for month June? 10 Customer 1 name : Cik Mah Tart nenas, kuih Kapit and Tart coklat orders (separate each input by space) : 212 The number of order records in queue - 1 Customer 2 name : Cik Ani Tart nenas, Kuih Kapit and Tart coklat orders (separate each input by space) : 1 2 2 The number of order records in queue = 2 Customer 3 name : Cikgu Ann Tart nenas, Kuih Kapit and Tart coklat orders (separate each input by space) : 3 2 The number of order records in queue = 3 Customer 4 name : Cikgu Zul Tart nenas, kuih Kapit and Tart coklat orders (separate each input by space) : @ 3 The number of order records in queue - 4 Customer 5 name : Cikgu Burn Tart nenas, Kuih Kapit and Tart coklat orders (separate each input by space) : 2 2 2 The number of order records in queue - 5 Customer 6 name : Nora Tart nenas, Kuih Kapit and Tart coklat orders (separate each input by space) : 1 1 1 The number of order records in queue = 6 Customer 7 name : Makcik R Tart nenas, kuih kapit and Tart coklat orders (separate each input by space) : The number of order records in queue - 7 Customer 8 name : Cikgu Mat Tart nenas, Kuih Kapit and Tart coklat orders (separate each input by space) : 41 The number of order records in queue - 8 Figure 3a Customer 9 name : Hajah Ros Tart nenas, kuih Kapit and Tart coklat orders (separate each input by space) : 214 The number of order records in queue = 9 Customer 10 name : Hajah Teh Tart nenas, Kuih Kapit and Tart coklat orders (separate each input by space) : 404 The number of order records in queue - 10 Order for month : June Customer Tart Nenas Kuih Kapit Tart coklat Payment(RM) Cik Mah 2 1 2 134.00 Cik Ani 1 2 2 122.00 Cikgu Ann 3 2 @ 126.00 Cikgu Zul @ 3 @ 54.00 Cikgu Burn 2 2 2 152.ee Nora 1 1 1 76.00 Makcik R 3 84.00 Cikgu Mat @ 4 1 100.00 Hajah Ros 2 1 4 190.00 Hajah Teh 4 4 232.00 Total Tart Nenas : 15 Total Kuih Kapit : 16 Total Tart Coklat: 19 Total Payment : RM1270.00 execution time : 149.168 5 Process returned @ (exo) Press any key to continue. Figure 3bStep 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