Problem 2: Point of Sale System
The McDowell Restaurant chain has asked you to write a menu program
for their new Fast-food
service machines. Your program already prints the following menu
like this:
**********************************************************************
McDowell’s Restaurant
**********************************************************************
Make your selection from the menu below:
1. Regular Hamburger $1.50
2. Regular Cheeseburger $1.75
3. Fish Sandwich $2.50
4. Half-pounder with cheese $2.75
5. French Fries $0.99
6. Large Soft Drink $1.25
***********************************************************************
Select 1, 2, 3, 4, 5, or 6 ----- >
Your program must now read the customer’s selection and compute the
total price of their
purchase, including 6.5% sales tax.
Input
The first line of input represents N, the number of test cases. The
additional lines consists of a
sequence of integers scoped between 1 to 6. Each number should
indicate a selection from the
above menu to be purchased.
Output
The program should print the sum of the orders plus tax as “Please
pay $<dollars>”, where
<dollar> is the total amount of the purchase then conclude
with “Thank you for eating at
McDowell’s”.
Sample Input Sample Output
1
1 4 4 5 3 1 Please pay $12.77
Thank you for eating at McDowell’s!
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int n,choice[100];
float total_without_taxes=0,total_with_taxes=0,val;
cout<<"**********************************************************************\n";
cout<<"McDowell’s Restaurant\n";
cout<<"**********************************************************************\n";
cout<<"Make your selection from the menu below:\n";
cout<<"1. Regular Hamburger $1.50\n";
cout<<"2. Regular Cheeseburger $1.75\n";
cout<<"3. Fish Sandwich $2.50\n";
cout<<"4. Half-pounder with cheese $2.75\n";
cout<<"5. French Fries $0.99\n";
cout<<"6. Large Soft Drink $1.25\n";
cout<<"***********************************************************************\n";
cout<<"Select 1, 2, 3, 4, 5, or 6 ----- >\n";
cin>>n;
for(int i=0;i<n;++i)
{
cin>>choice[i];
}
total_without_taxes=0.0;
for(int i=0;i<n;++i)
{
if(choice[i]==1)
val=1.5;
else if(choice[i]==2)
val=1.75;
else if(choice[i]==3)
val=2.5;
else if(choice[i]==4)
val=2.75;
else if(choice[i]==5)
val=0.99;
else if(choice[i]==6)
val=1.25;
total_without_taxes+=val;
}
total_with_taxes=total_without_taxes*1.065;
printf("Please pay $%.2f\n",total_with_taxes);
cout<<"Thank you for eating at McDowell's!";
}
Hope it helps ...In case of any queries feel free to ask me any doubts
happy Coding :) :)
Problem 2: Point of Sale System The McDowell Restaurant chain has asked you to write a...
IN C# Write a program to help a local restaurant automate its lunch billing system. The program should do the following: Show the customer the different lunch items offered by the restaurant. Allow the customer to select more than one item from the menu. Calculate and print the bill. Assume that the restaurant offers the following lunch items (the price of each item is shown to the right of the item): Ham and Cheese Sandwich $5.00 Tuna Sandwich $6.00 Soup...
The code snippet below is part of the restaurant menu program you previously used in the lab. Add a choice for a drink. Add the necessary code to allow the program to calculate the total price of order for the user. Assume the following price list: Hamburger $5 Hotdog $4 Fries $3 Drink $2 The program should allow the user to keep entering order until choosing to exit. At the end the program prints an order summary like this: You...
Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...
Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...
In C++ Programming Write a program in Restaurant.cpp to help a local restaurant automate its breakfast billing system. The program should do the following: Show the customer the different breakfast items offered by the restaurant. Allow the customer to select more than one item from the menu. Calculate and print the bill. Assume that the restaurant offers the following breakfast items (the price of each item is shown to the right of the item): Name Price Egg (cooked to order)...
Overview JAVA LANGUAGE PROBLEM: The owner of a restaurant wants a program to manage online orders that come in. This program will require multiple classes. Summary class, customer class, order class and the driver class. Summary class This class will keep track of the cost of the order and output a summary, which includes the total for the order. The methods in this class are static. There are no instance variables, and instead uses an Order object that is passed...
program is C# Design a restaurant class to help manage multiple restaurants and their menus equiremen The class contains: 1) A static int variable named storeCounter that starts at 1 and increments for each new restaurant item that is created 2) A string array called Menu 3) An int variable called StoreID 4) A Boolean variable called isOpen 5) A no-argument constructor that performs the following a. Sets storelD to storeCounter, then increments storeCounter b. Sets isOpen to true c....
Help Please on JAVA Project: Validating the input is where I need help. Thank you Requirements description: Assume you work part-time at a sandwich store. As the only employee who knows java programming, you help to write a sandwich ordering application for the store. The following is a brief requirement description with some sample output. 1. Selecting bread When the program starts, it first shows a list/menu of sandwich breads and their prices, then asks a user to select a...
Your assignment is to create a restaurant ordering system where the cashier can create the menu and then take in the order and display the order back to the customer Sample Execution – Level 1 Welcome to your Menu Creation system. How many items would you like to have on your menu? 2 Create your menu! Enter item #1: Coffee Enter item #2: Tea This is the menu: Coffee Tea What would you like to order? Cake That isn’t on...
How would I do this problem? Write a C++ menu driven Payroll program. Must be user friendly. Menu 1. Check data file 2. Read Data file 3. Process payroll for one employee 4. Process payroll for all employees 5. Print out to a text or an HTML file 6. Exit You must use the following Payroll classes, structures, pointers, arrays, enum, vector, recursive, advance file I/O, STL, template, iterators and containers. The program to process an input file below to...