Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write program in C++ Mini Project You are opening a new trendy pizza shop where customers can buy, not only circular pizza, but also

image text in transcribed

image text in transcribed

Please write program in C++

Mini Project You are opening a new trendy pizza shop where customers can buy, not only circular pizza, but also square and hexagonal pizzas. Write a program incorporating the following functions (with appropriate parameters, pass by reference). The price of the pizza is based on the area of the pizza, tax and the service charge. The program continues to run until the customer chooses to exit from it. Function main() mainMenu() getData() Description contain function calls for the following functions. display the main menu; customers may continue or exit the program at this stage. Use appropriate loop. Do you wish to continue with your order or quit? rder uit Get the customer's details, such as name, address and mobile number. Get the pizza type and dimension from the customer. Type: ircular / quare / exagonal Dimension (in inches) c = diameter of circular pizza s = length of one side of square pizza h = length of one side of hexagon pizza circular square hexagonal S calc Area() calculate the area of the selected pizza type, based on the dimension given (c/s/h) calcPrice) calculate and display the price of the pizza. Add 2.5% as the government tax and 5% as the service charge. Pizza (circular) 12" RM 22.63 Govt. tax (2.5%) RM 0.57 Serv. charge (5%) RM 1.13 Amount Due RM 24.33 (Price per unit of pizza is RM 0.20 per square inch.) showBalance() get and display the amount paid by the customer. display the balance amount in terms of the various dominations. Amount Paid RM 50.00 Amount Due RM 24.33 Balance RM 25.67 RM 50 0 RM 20 1 RM 10 0 RM 5 RM 1 0 50 sen. 1 20 sen. 0 10 sen. 1 5 sen. 1 1 sen. 2 write the details (customer's name, pizza type and dimension, total price) to a file called pizza.dat writeToFile()

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

More Books

Students also viewed these Databases questions

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago