Chapter 11 Menu-Driven Programs Programming Exercises 1, Language Translator Design a program that displays the following menu: Select a Language and I Will Say Good Morning 1. English 2. Italian 3. Spanish 4. German 5. End the Program Enter your selection. dhotete The Language Pansiator Problem If the user selects item 1, the program should display "Good morning." If the user selects item 2, the program should dieplav "Buongiorno." If the user selects item 3, the program should display "Buenus s." If the user selects item 4, the program should display "Guten morgen."If the aser selects item 5, the program should en 66 66 CC 99
Q: Happy Numbers Programming challenge description: A happy number is defined by the following process.…
A: java used to answer this question:
Q: Java VENDING MACHINE Write a program that simulates a vending machine. The program should display a…
A: Java Programming refers to the object oriented programming languages that are used to develop the…
Q: Create a conversion program with 5 choices of conversion these are the available choices (energy,…
A: Here is the code: #include <stdio.h>void celcius_fahrenheit(double degrees){ printf("degrees…
Q: A coke vending machine is to be designed. A can of coke is selling at $3. The machine takes only $2…
A: The, answer has given below:
Q: LAB ASSIGNMENTS MPORTANT: you should complete the PDP thinking process for each program. Turn in…
A: Program Approach: 1- Import necessary regex pattern as re. 2- Create method as fullNamePattern()…
Q: Party-On sells individual hot/cold cups and dessert plates for parties. SueChen wants a program that…
A: The Party-On sells individual dessert plates and hot/cold cups for the parties. Create a program to,…
Q: ext Book: Starting Out with Programing Logic & Design 5 edition Write a program that will take in…
A: ANSWER:-
Q: Theater Ticket System: A small ten-seat theater has contracted you to build software which will…
A: Theater Ticket System: A small ten-seat theater has contracted you to build software which will…
Q: Airline Reservation System A small airline has just purchased a computer for its new automated…
A: NOTE: Here student did not mention any programming language. So, here i am using c language to…
Q: Choose 1, 2, 3, or 4 from the above menu or -1 to exit the program 1 *** ************* Please input…
A: 1. Using for loop to display menu in loop for each person. 2. Taking input from the user for choice…
Q: User defined Function: Return Value . ... MENU 4. Create a program compute the area of the following…
A: Below is the code in C++ as language not specified and sample output:
Q: Apartment problem) A real estate office handles, say, 50 apartment units. When the rent is, say,…
A: Program Approach: Include necessary header files define main method .In the main method declare and…
Q: This will be a menu-driven program. The menu should loðk IIKE IS. Menu ==== 1. Play…
A: The program is written in c++. The random generator generates 1,2 and 3 which stands for rock, paper…
Q: Part II. Write the corresponding C++ source code for the given task. The required screen output must…
A: // C++ program to illustrate// Menu-Driven program using Switch-case #include…
Q: Fast Food Restaurant Make a program that has several food items on the menu with prices. The…
A: Note: Code runs successfully as the above problem describe. I am using the c++ language to do this…
Q: Comm Target Outcome: (CO2) Write algorithms to solve different programming problems using flowchart…
A: Here we make simple flow chart:===================================================================
Q: 23. Geometry Calculator Write a program that displays the following menu: Geometry Calculator 1.…
A: #include <iostream>#include <iomanip> #include <cmath> using namespace std;…
Q: Simple Arithmetic Calculator Create a program that would accept two input numbers then display the…
A: txt = "ARITHMATIC CALCULATOR"x = txt.center(40)print(x)txt = "MAIN MENU"x = txt.center(40)print(x) #…
Q: Develop a program that will display a menu that must contain a 6 choices(including submenu) and 5…
A: Python Code: # defining functions def p_circle(radius): para = 2 * 3.14 * radius…
Q: Example Menu for C++ Programming A] Multiply numbers [B] Sort numbers (Even or Odd) [X] Exit Choose…
A: Step 1 : Start Step 2 : In the main function , Define a while loop to iterate till the user wants.…
Q: 1) Pseudo code algorithm 2) JAVA program ( IntelliJ ) The Meteorological service requires a…
A: Initialize variables, rainfallLevel <-- 0, currMax <-- 0, currMin <-- 9999, currAvg <--…
Q: 8. Write a program: a menu-driven automatic teller program in which the user's bank balance is…
A: The code for the given problems below- #include <stdio.h> #include<stdlib.h> int…
Q: The user decides whether 1. Trapezoid, 2. Ellipse, or 3. Equilateral Triangle. Compute the area of…
A: Algorithm: Start Show menu to the user and ask user to choose If choice is 1, read b,h1,h2 and…
Q: Create an algorithm for a menu based program that uses a switch-case statement to include the…
A: #include <iostream>using namespace std;int main() { int userinput; string name; cout…
Q: Design a scientific calculator in C++. Display the main menu to the user and according to his choice…
A: Algorithm: Start ask the user to Press 1 for Arithmetic Operations and Press 2 for Trigonometric…
Q: A statement is a a control flow statement that repeatedly executes a statement or a series of…
A: Given: Choose the option.
Q: Create an algorithm for a menu based program that uses a switch-case statement to include the…
A: In a menu driven program, the user is given a set of choices of things to do (the menu).Then user is…
Q: def display_welcome(): print("This program will create a wish list for the user.")…
A: For 6% we need to multiply with 0.06 Also while invoking get_tax() we need to pass sub as parameter…
Q: The Game of Nim Problem Description: Two players alternately take marbles from a pile. In each move,…
A: Program Requirements as per question: The program must define and use the following methods, int…
Q: Your program should consist of at least the following functions: a function to show the user how to…
A:
Q: Theater Ticket System: A small ten-seat theater has contracted you to build software which will…
A: Theater Ticket System: A small ten-seat theater has contracted you to build software which will…
Q: Solve it using pseudocode (no python syntax allowed) Code it in Python - must use decision structure…
A: Initialize rate variable to store value later: rate=0 Initialize while loop to keep checking for…
Q: BMI Calculator Create a C program that will compute for the body-mass index of a given height and…
A: Algorithm: Start Display the menu to the user and ask the user to choose If user chooses 1, read…
Q: 5. Falling Distance determine the distance the object falls in a specific time period: 1 d = The…
A: iterate from i=1 to i<=10 FallingDistance(i) end loop Define function fallingDistance(int…
Q: C++ LANGUAGE Create a menu system program using Function: Menu System (1st way) 1 –…
A: Create a menu system program using Function: Menu System (1st way) 1 – converting ft to inch 2 –…
Q: 1. Create a class menu-driven automatic teller program in which the user's bank balance is…
A: The code is written below: import java.util.Scanner; class Main{ public static void main…
Q: 12: guess.cpp) Irite a program that plays a guessing game with the user. The user should pick a…
A: The variables are declared to hold the starting letter, 'a', ending letter, 'z', and the guessed…
Q: Hands-On Activity 4-4 BuzzButtons is a novelty item company manufacturing personalized lapel buttons…
A: The answer is given below:-
Q: C Program for a menu based program that uses a switch-case statement to include the following…
A: Program: #include <stdio.h> #include <ctype.h> #include <stdlib.h> //Menu…
Q: A. First and Last Design a program that asks the user for a series of names (in no particular…
A: Answer: Here is the python Code : END = "END"#creating a list to store the namesls = []#prompt…
Q: Lab 1-1: Stop and Analyze A local business employs five salespeople and pays a 3% bonus on a…
A: Logic:- initiate a loop from i=0 to 4 Input name Input amount Calculate…
Q: rite an algorithm that will calculate the salary of an employee for the month, and then display on…
A: The given details are related to calculating the salary of employees working for a Car company. The…
Q: Create a menu-driven program that calculates the area of a few, basic geometric shapes
A: #include <iostream>#include <math.h>#include <iomanip> using namespace std; int…
Q: Sports exercise advisor algorithm. In this algorithm you will start out with a temperature value in…
A: The given requirement is to develop an algorithm for deciding the sports exercise based on the…
Q: LAB ASSIGNMENT, CONT. 3. feedback_collector.py - use all.of the mipo_ ex program features for this…
A: EXPLANATION: - The program comprises 4 functions namely main, validate_str,process_str, and…
Q: Subject: programming language : c++ Question : Jane has opened a new fitness center with charges…
A: I have added the output screenshot. Also with total money made, the code prints members and their…
Q: Casel: Write a menu driven program that allows you to visit cities of man in random order with…
A: Given: Casel: Write a menu driven program that allows you to visit cities ofman in random order with…
Q: Use C Language Airline Reservation System A small airline has just purchased a computer for its…
A: Answer :
Q: 19. The manager of a video rental store wants a program that calculates the amount a customer owes…
A: a) When the user enters 3 as the number of late days then the algorithm will compute the flowing: It…
Q: The company « Super discounted used cars inc.» pays their employees according to this chart: 250$…
A: Introduction The given details are related to calculating the salary of employees working for a Car…
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
- (Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. The president has asked you to program the new system. You’ll write a program to assign seats on each flight of the airline’s only plane (capacity: 10 seats). Your program should display the following menu of alternatives: Please type 1 for "first class" Please type 2 for "economy" If the person types 1, then your program should assign a seat in the first class section (seats 1– 5). If the person types 2, then your program should assign a seat in the economy section (seats 6– 10). Your program should then print a boarding pass indicating the person's seat number and whether it’s in the first class or economy section of the plane. Initialize all the elements of the array to 0 to indicate that all seats are empty. As each seat is assigned, set the corresponding element of the array to 1 to indicate that the seat is no longer available. Your program should, of course,…Snack bar menu Write a program in phyton that allows the user to choose from the following menu untilhe/she chooses to exit. The program should keep a running total of the chargesand then add 6% sales tax to calculate the final bill. Display the total to theuser.1) Personal Pizza $6.002) Pretzel $2.503) Chips $1.254) Hot Dog $3.755) ExitInput validation: The user must choose 1 - 5 from the menu.Example Output:Welcome to Yum Yum Snack Bar!Please choose from the following menu:1) Personal Pizza $6.002) Pretzel $2.503) Chips $1.254) Hot Dog $3.755) ExitEnter your choice here: 1Current total: $6.00Please choose from the following menu:1) Personal Pizza $6.002) Pretzel $2.503) Chips $1.254) Hot Dog $3.755) ExitEnter your choice here: 3Current total: $7.25Please choose from the following menu:1) Personal Pizza $6.002) Pretzel $2.503) Chips $1.254) Hot Dog $3.755) ExitEnter your choice here: 8Invalid choice. Must choose 1 – 5. Try again.Please choose from the following menu:1) Personal Pizza…Casel: Write a menu driven program that allows you to visit cities ofman in random order with following options.1: Visit a city2: Go to previous city3: Quit theprogramWhen user presses 1: program asks user to enter the city name, andthen display that the city has been visited. Please note user can visit acity any number of timesWhen user presses 2: Program takes you back to the previous cityWhen user presses 3: Program terminatesSee the below example how program interacts with the user:C:> 1: Visit a cityprogramEnter your choice2: Go to previous city3: Quit thePlease enter a city to visit.MuscatYou are in Muscat now.Enter your choice.1: Visit a city2: Go to previous cityPlease enter a city to visit.IbraYou are in Ibra noW.Enter your choice.1: Visit a city2: Go to previous cityPlease enter a city to visit.SoharYou are in Sohar now.Enter your choice.1: Visit a city2You are in Ibra now.2: Go to previous cityEnter your choice.1: Visit a city2: Go to previous cityPlease enter a city to…
- Airline Reservation System A small airline has just purchased a computer for its new automated reservations system. The president has asked you to program the new system. You are to write a program to assign seats on each flight of the airline's only plane (capacity: 10 seats). Your program should display the following menu of alternatives: Please type 1 for "first class" Please type 2 for "economy" If the person types 1, then your program should assign a seat in the first class section (seats 1-5). If the person types 2, then your program should assign a seat in the economy section (seats 6-10). Your program should then print a boarding pass indicating the person's seat number and whether it is in the first class or economy section of the plane. Use a single-subscripted array to represent the seating chart of the plane. Initialize all the elements of the array to 0 to indicate that all seats are empty. As each seat is assigned, set the corresponding elements of the array to 1 to…___&Mp99. 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. .18. Tom and Jerry opened a new lawn service. They provide three types of services: mowing, fertilizing, and planting trees. The cost of mowing is $35.00 per 5,000 square yards, fertilizing is $30.00 per application, and planting a tree is $50.00. Write an algorithm that prompts the user to enter the area of the lawn, the number of fertilizing applications, and the number of trees to be planted. The algorithm then determines the billing amount. (Assume that the user orders all three services.) (9)
- C++ Visual Studio Modify the following program so it displays a menu allowing the user to select an addition, subtraction, multiplication, or division problem. The final selection on the menu should let the user quit the program. After the user has finished the math problem, the program should display the menu again. This process is repeated until the user chooses to quit the program. Input Validation: If the user selects an item not on the menu, display an error message and display the menu again. Code: #include <iostream>#include <cstdlib>#include <ctime>#include <conio.h> using namespace std; int main() {srand(static_cast<unsigned int>(time(nullptr))); while (true) {// Generate two random numbers.int num1 = rand() % 1000;int num2 = rand() % 1000; // Display the problem.cout << "Solve the following math problem:" << endl;cout << num1 << " + " << num2 << endl; // Wait for user input to reveal the answer.cout <<…C code blocks People in a queue are waiting to get the COVID-19 vaccine. The following piece of code prints a menu of the different age groups that can be vaccinated. When a person enters an option on the menu for age groups that are 18 years and older, it should print a message: Congratulations, your age group can be vaccinated. When a person enters an option on the menu for the age group 0 to 17 years, it should print a message: Unfortunately, your age group is not allowed to be vaccinated. For any option that is not on the menu, it should print a message: Invalid menu option! Write ONLY THE MISSING lines of code using a switch statement. Please take note of all the capital letters, spaces and punctuation marks in the messages. Do not add a new line at the end or beginning of a message. Use the default case for any other age group option not specified on the menu. Remember to add a break after each case statement. #include <stdio.h>#include <stdlib.h>int…in the programming language swift: I need to make convienent store inventory program. it will have five items: chips....1.99 chocolate...3.39 hot dog...2.89 pizza..3.85 gas...2.15 a gallon The main screen should be the option list. Once selected the system should ask for which item and how many. The system needs to ask the user if they want more items. After all the items are entered, it should calculate everything. Then it needs to add tax at 9.2 percent. Add everything together. then the system should ask for cash, enter an amount and show the change.
- CSCI 1010 – Programming Assignment 3Learning Outcomes• Develop a menu-based interface using control structures.• Use switch statements with integers, characters, and strings.• Write code that repeatedly performs actions using while, do-while and forstatements.• Use boolean variables as conditions for branching statements and loops.InstructionsFor this assignment you must write a program that displays a calendar month in the following format:MAR 2021Su Mo Tu We Th Fr Sa1 2 3 4 5 67 8 9 10 11 12 1314 15 16 17 18 19 2021 22 23 24 25 26 2728 29 30 31Your program should do the following:1. Display a welcome message with your name.2. Prompt the user for the year.• If the year is not between 1753 and 9999, display an error and exit the program.3. Use an if-else statement to determine if the year is a leap year.• Use a boolean variable to represent if the year is a leap year.• If the year is a multiple of 400, it is a leap year.• Otherwise, if the year is a multiple of 100, it is not a leap…Design a program that displays the following menu: IN QBASIC LANGUAGE QBASIC Select a Language and I Will Say Good Morning1. English2. Italian3. Spanish4. German5. End the ProgramEnter your selection.If the user selects item 1, the program should display “Good morning.” If the user selects item 2, the program should display “Buongiorno.” If the user selects item 3, the program should display “Buenos dias.” If the user selects item 4, the program should display “Guten morgen.” If the user selects item 5, the program should end.**ASSEMBLY LANGUAGE** Weight Loss If moderately active persons cut their calorie intake by 500 calories a day, they can typically lose about 4 pounds a month. Write a program that has the users enter their starting weight and then creates and displays a table showing what their expected weight will be at the end of each month for the next 6 months if they stay on this diet.