Question: Please use C++ to compile a program: place order in a burger restaurant. The program needs to use date.h and date.cpp, which can sign the
Please use C++ to compile a program: place order in a burger restaurant. The program needs to use date.h and date.cpp, which can sign the Real-time of placing an order, which should include month, date, year, hour, minute, second. The program should also use order.h and order.cpp, in the order.cpp should include order number, customer name, order item, tax rate, subtotal, total. In the oreder.cpp, the tax = subtotal* (1+tax rate), subtotal is the sum of order item's prices, total = subtotal + tax. Finally, I also need a main.cpp, which should display the price of the item clicked. Finally, accumulate the output result is receipt, should include order information(restaurant name, order number, customer name, Order item, quantity, subtotal,tax rate(7.5%), total), time stamp( month, day, year, hour, minute, second) The data type should includes: date, time, timeStamp, manuItem, manu, orderItem, orderItemList, order, orderList, restaurant The date.h should be like this ex: TimeStamp getCurrent TimeStamp() { TimeStamp ts; return ts.date.day ts.date.month ts.date.year } The result of this program which output should be a standard format of receipt, should include order information(order number, name, Order item, quantity, subtotal, total), time stamp( month, day, year, hour, minute, second) The main.cpp should like: 1. Restaurant r;
r. name=In and Out ;
r.taxRate = 0.0775;
r. menu[0].name = Double-double ;
r. menu[0].unitPrice = 5.99;
r. menu[0].cost = 2.00;
r. menu[1].name = Cheese burger ;
r. menu[1].unitPrice = 3.99;
r. menu[1].cost = 1.49;
r. menu[2].name = Fries;
r. menu[2].unitPrice = 2.75;
r. menu[2].cost = 1.25;
r. menu[3].name = Milkshake;
r. menu[3].unitPrice = 3.50;
r. menu[3].cost = 1.25;
r. menu[4].name = Soda;
r. menu[4].unitPrice = 2.00;
r. menu[4].cost = 0.75;
r.currentOrderNumber = 0;
2. Order list, the following are the 15 orders
Order 0)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double;
myOrderItem[0].qty = 2;
myOrderItem[1].name = Fries;
myOrderItem[1].qty = 1;
Order 1) OrderItemList myOrderItems;
myOrderItem[0].name = Double-double;
myOrderItem[0].qty = 2;
myOrderItem[1].name = Fries;
myOrderItem[1].qty = 1;
Order 2)OrderItemList myOrderItems;
myOrderItem[0].name = Cheese burger ;
myOrderItem[0].qty = 2;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 2;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 2;
Order 3)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double ;
myOrderItem[0].qty = 3;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 3;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 3;
Order 4)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double ;
myOrderItem[0].qty = 5;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 4;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 3;
myOrderItem[3].name = Milkshake;
myOrderItem[3].qty = 1;
Order 5)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double ;
myOrderItem[0].qty = 4;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 5;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 5;
myOrderItem[3].name = Milkshake;
myOrderItem[3].qty = 2;
Order 6)OrderItemList myOrderItems;
myOrderItem[0].name = Cheese burger;
myOrderItem[0].qty = 5;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 4;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 3;
myOrderItem[3].name = Milkshake;
myOrderItem[3].qty = 1;
Order 7)OrderItemList myOrderItems;
myOrderItem[0].name = Cheese burger ;
myOrderItem[0].qty = 2;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 2;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 2;
myOrderItem[3].name = Milkshake;
myOrderItem[3].qty = 5;
Order 8)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double ;
myOrderItem[0].qty = 1;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 1;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 1;
Order 9)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double ;
myOrderItem[0].qty = 1;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 2;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 1;
Order 10)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double ;
myOrderItem[0].qty = 2;
myOrderItem[1].name = soda;
myOrderItem[1].qty = 2;
myOrderItem[2].name = Fries;
myOrderItem[2].qty = 1;
Order 11)OrderItemList myOrderItems;
myOrderItem[0].name = Double-double ;
myOrderItem[0].qty = 2;
Order 12)OrderItemList myOrderItems;
myOrderItem[0].name = soda;
myOrderItem[0].qty = 2;
Order 13)OrderItemList myOrderItems;
myOrderItem[0].name = soda;
myOrderItem[0].qty = 2;
Order 14)OrderItemList myOrderItems;
myOrderItem[0].name = Milkshake;
myOrderItem[0].qty = 5;
3.Order 0 = placeOrder (r, myOrderItems, 2, Henry);
printReceipt (0);
Order 1 = placeOrder (r, myOrderItems, 2, Tom);
Order 2 = placeOrder (r, myOrderItems, 3, Ryan);
Order 3 = placeOrder (r, myOrderItems, 3, Fredrick);
Order 4 = placeOrder (r, myOrderItems, 4, Jerry);
Order 5 = placeOrder (r, myOrderItems, 4, Vince);
Order 6 = placeOrder (r, myOrderItems, 4, Allen);
Order 7 = placeOrder (r, myOrderItems, 4, Harry);
Order 8 = placeOrder (r, myOrderItems, 3, Zich);
Order 9 = placeOrder (r, myOrderItems, 3, Grace);
Order 10 = placeOrder (r, myOrderItems, 3, Doris);
Order 11 = placeOrder (r, myOrderItems, 1, David);
Order 12 = placeOrder (r, myOrderItems, 1, William);
Order 13 = placeOrder (r, myOrderItems, 1, George);
Order 14= placeOrder (r, myOrderItems, 1, Paul);
Just use similar above program to print the order 0 in the output to as an receipt, which should include: restaurant name, order number, customer name, order items, order quantities, subtotal, tax rate(7.5 %), total and time stamp( month, day, year, hour, minute, second) Use the function void printReceipt(const order& order)'' show me what the order 0s receipt looks like, and separately call get these 15 orders statistics. Statistic these 15 orderss data:1.Most popular menu item in these 15 orders 2.total gross sale(exclude) 3.total cost 4.Net profit in these 15 orders 5.Per Item profit(Double-double, Cheese burger, Fries, Soda, Milkshake), and finally print the status. Finally, we place 15 orders totally in this program, but only print receipt Order 0 in the output, next is a dividing line, and following should print these 15 orders statistics (1.Most popular menu item in these 15 orders 2.total gross sale(exclude) 3.total cost 4.Net profit in these 15 orders 5.Per Item profit(Double-double, Cheese burger, Fries, Soda, Milkshake) #Must use getStats and printStats two functions
#Must include these following 4 functions: placeOreder
printReceipt
getStats
printStats
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
