Specifications
Develop a program to allow the user to interactively enter choices for a meal and process the cost of the meal. For the main course, the customer can choose steak $6), shrimp($8), fish($5) or chicken($4). To go with the main course, there is a choice of rice ($3) or potato ($2). The customer can also choose to order salad ($3). The program should allow the user to enter the customer’s choices and print the total cost of the meal.
You can assume that customers will order one of the main courses and either rice or potato. Customers may choose not to order salad.
Format of the output:
The total cost of the meal is $##.##
Run the program with the following 2 meal orders:
1. Steak, potato, salad
2. Chicken, rice, no salad
Run the program twice; once for each meal order.
Step by stepSolved in 3 steps with 3 images
- In C write a simple scientific calculator program as follows:Display a menu of options according to table.Ask the user to enter a menu option (upper and lower case will work).If menu option is not valid, display msg “invalid option” and repeat parts 1 and 2. (use do-while)For “add” option ask the user to enter two numbers, store as double and display sum.For subtract option ask the user to enter two numbers, store as double and display difference.For multiply option, same as above.For divide option, same as above (test the denominator, if zero, display an appropriate msg).For squared, ask the user to input a number and output the square of the number.For square root, check if the number is negative and output appropriate msg, otherwise, output solution.For factorial, ask for a number an output factorial ( 5! = 5*4*3*2*1). (use for loop)For absolute value, output the absolute value of a given number.For greater integer, round the number to an integer greater than number.For leap year,…arrow_forwardDesign and implement an application that reads an integer value representing a year from the user. The purpose of the program is to determine whether the year is a leap year (and therefore has 29 days in February) in the Gregorian calendar. A year is a leap year if it is divisible by 4, unless it is also divisible by 100 but not 400. For example, the year 2003 is not a leap year, but 2004 is. The year 1900 is not a leap year because it is divisible by 100, but the year 2000 is a leap year because even though it is divisible by 100, it is also divisible by 400. Produce an error message for any input value less than 1582 (the year the Gregorian calendar was adopted)arrow_forward: Write a python program to simulate an online store. The program should begin by displaying a list of products and their prices. There should be a minimum of 4 products offered. The program should ask the user to choose a product and then ask the user to enter the quantity they require of that product. The program should then allow the user to keep choosing more products and quantities until they enter something to indicate they want to end the program (e.g. a given number or ‘q’ or ‘exit’). The program should then tell the user the total amount for the products they have selected.arrow_forward
- create a JAVA PROGRAM as a Currency Converter program. The program performs Currency Exchange operation between Saudi Riyals R, Dollars $, Euro € and British Pounds £. The program firstly shows a menu to the user which allows the user to choose one of the possible currency exchange operations and the last option in the menu should allow the user to end the program (see figure1). The menu should be like as figure 1. If the user enters a wrong choice, an error message should appear and the program asks the user to re-enter a correct number. When the user selects an operation, the program do the following: Prompt user to enter the amount to be changed Input amount Calculate and print the result. Once the user presses any key, the menu appears again and the user can choose a new operation. Your output should be similar to the result in figure 2. Note: Currency change rate is assumed to be known in your program. For example, to convert from Riyals to Euro, change rate = 0.22751799.…arrow_forwardQuestion I need a java program for a Craps game When the program is run, it will prompt the player for the starting balance of their account (in dollars). At the start of each game, the player will be asked for their bet. The bet must be at least $1, but cannot exceed the balance of their account During the game, the outcome of each roll must be output to the display. When the outcome of the game is decided, the account balance must be updated accordingly based on the player’s bet. If the player wins, the amount of the bet is added to the account balance; if the player loses, the account balance is decreased by the bet amount. At the end of each game, the game outcome must be summarized (e.g., player wins or loses), along with the player’s updated account balance. The player will continue to play Craps games until one of the following conditions occur: They voluntarily elect to end the session. After each game, once all required information has been output, the player will be…arrow_forwardCreate a C++ program that demonstrates a simple burger vending machine process. The program would display a welcome message and would ask the user if he/she wants to order a burger. If the user entered "yes", the program would display a list of burger menu. The program would then prompt the user to select a burger. After the user have selected a burger, the program would ask the user if he/she would want to add a drink with that. If the user entered yes, then the burger machine would display a list of drinks for user selection. The burger machine program would then just simply display a message of the items that the user have selected. Example program output: Welcome to Ka Tupeng's Burger Machine Would you like to order a burger? (Yes/No) Please select a burger: [1]Regular burger [2]Cheese Burger [3]Double Patty Burger [4] Double Patty with Egg burger Would you like to add a drink with that? (yes/no) Please select your drink: [1]Sakto coca cola [2]Mountain Dew [3]C2 [4] Ice Tea…arrow_forward
- In C++ please, using basic programming one coding The main menu should show the available options: Show the roster: Displays all the player names and jersey numbers in a numbered list. Ex: 1. Susan Martinez (33), 2. Jake Smith (21), etc. Add a player: Prompts the user to type the player's full name and jersey number. Then adds the player to the roster. Remove a player: Displays the roster and prompts the user to enter the number of the player to remove. Then removes the player from the roster. Quit: Quits the program. The program should display the main menu after the user shows the roster, adds a player, or removes a player. The program only terminates when the user chooses the quit option. Data validation should be used where appropriate. Ex: The user should not be able to choose an option that doesn't exist or delete a player that doesn't exist. The roster should be kept in alphabetic order by the players' full names. Ex: If Alice Chang (9) is added to a roster with Jake Smith and…arrow_forwardWrite a console in c#arrow_forwardin Pythonarrow_forward
- Asking help for Java Programming Create a program that simulates a meeting reservation system. Part 1: Basic requirements The program shall allow the user to select from the following options: Create a new meeting Show meetings on the calendar Clear all meetings Each meeting has a subject, start day/time and end day/time Subject is a short text description of the meeting Day is a date that contains month, day, and year Meeting times need only deal with hour and minute When the user wants to create a new meeting, the program asks for the subject, start and end day/times for it and adds it to the calendar For the basic requirements, meetings are not allowed to overlap. If a meeting the user wants to schedule overlaps with an existing meeting, the program presents an error message showing which meeting the one the user wants to schedule overlaps with When the user wants to show all meetings for the week, the report displays all meetings each day as follows Show all meetings…arrow_forwardDevelop a program that allows the user to enter a start value of 1 to 4, a stop value of 5 to 12 and a multiplier of 2 to 8. The program must display a multiplication table with results using these values. For example, if the user enters a start value of 3, a stop value of 7 and a multiplier value of 3, the table should be displayed as follows: Multiplication Table 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 additionally Each multiplication problem must be displayed with a problem number. The program must prompt the user to enter an answer to each of the multiplication problems. The correct answer should be displayed after the user enters an answer. A message should be displayed informing the user that the answer entered was correct or incorrect followed by an appropriate motivating comment. A running record of the number of correct and incorrect responses must be kept. After all the problems have been presented the user must be informed of his/her performance; number of…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY