A restaurant in Amman provides 2 offers for customers: o Regular Meal: The base price of the meal is 2.00 JD. The meal comes with one regular sandwich and one drink. Customers can order extra drinks each for 0.5 JD. Also, customers can order extra sandwiches each for an extra 1.25 JD o Family Meal: The base price of the meal is 5.00 JD. The meal comes with 3 regular sandwiches and 3 drinks. Customers can order extra drinks each for 0.35JD. Also customers can order extra sandwiches each for extra 0.75 JD Write a function named displayMenu that displays the following options for the user to select from o RRegular Meal o F-Family Meal o Q-Exit the program Write a function named getOption that calls the displayMenu function and prompts the user to enter one of the 3 letters. When an invalid option code is detected, the function will display an error message, and then the menu displayed again until a valid option is used. Write a function named getlnputs to read a. the number of extra sandwiches b. the number of extra drinks. Write a function named billCalculator that takes as arguments the meal's type, number of extra sandwiches, and the number of extra drinks. The function billCalculator returns the amount of money that the customer will be billed The program (i.e. the main function) Should properly o Call getOption to get the user choice o Call getInputs to read the number of extra sandwiches, and the number of extra drinks o Call billCalculator and prints the amount of money that the customer will be billed o The program should repeat the above steps until the user enters the Q option to exit
A restaurant in Amman provides 2 offers for customers: o Regular Meal: The base price of the meal is 2.00 JD. The meal comes with one regular sandwich and one drink. Customers can order extra drinks each for 0.5 JD. Also, customers can order extra sandwiches each for an extra 1.25 JD o Family Meal: The base price of the meal is 5.00 JD. The meal comes with 3 regular sandwiches and 3 drinks. Customers can order extra drinks each for 0.35JD. Also customers can order extra sandwiches each for extra 0.75 JD Write a function named displayMenu that displays the following options for the user to select from o RRegular Meal o F-Family Meal o Q-Exit the program Write a function named getOption that calls the displayMenu function and prompts the user to enter one of the 3 letters. When an invalid option code is detected, the function will display an error message, and then the menu displayed again until a valid option is used. Write a function named getlnputs to read a. the number of extra sandwiches b. the number of extra drinks. Write a function named billCalculator that takes as arguments the meal's type, number of extra sandwiches, and the number of extra drinks. The function billCalculator returns the amount of money that the customer will be billed The program (i.e. the main function) Should properly o Call getOption to get the user choice o Call getInputs to read the number of extra sandwiches, and the number of extra drinks o Call billCalculator and prints the amount of money that the customer will be billed o The program should repeat the above steps until the user enters the Q option to exit
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
note : dont use string library
it is a C code
![A restaurant in Amman provides 2 offers for customers:
o Regular Meal: The base price of the meal is 2.00 JD. The meal comes with one regular sandwich and one drink. Customers can order extra
drinks each for 0.5 JD. Also, customers can order extra sandwiches each for an extra 1.25 JD
o Family Meal: The base price of the meal is 5.00 JD. The meal comes with 3 regular sandwiches and 3 drinks. Customers can order extra
drinks each for 0.35JD. Also customers can order extra sandwiches each for extra 0.75 JD
Write a function named displayMenu that displays the following options for the user to select from
o RRegular Meal
o F- Family Meal
o Q- Exit the program
Write a function named getOption that calls the displayMenu function and prompts the user to enter one of the 3 letters. When an invalid
option code is detected, the function will display an error message, and then the menu displayed again until a valid option is used.
Write a function named getlnputs to read
a.
the number of extra sandwiches
b.
the number of extra drinks.
Write a function named billCalculator that takes as arguments the meal's type, number of extra sandwiches, and the number of extra
drinks. The function billCalculator returns the amount of money that the customer will be billed
The program (i.e. the main function) Should properly
o Call getOption to get the user choice
o Call getlnputs to read the number of extra sandwiches, and the number of extra drinks
o Call billCalculator and prints the amount of money that the customer will be billed
o The program should repeat the above steps until the user enters the Q option to exit](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe49307f1-caeb-475f-8f59-9bd76edfdeb9%2F9f656536-fdb0-4007-86bc-cd99777d298e%2Fj0m7d5e_processed.png&w=3840&q=75)
Transcribed Image Text:A restaurant in Amman provides 2 offers for customers:
o Regular Meal: The base price of the meal is 2.00 JD. The meal comes with one regular sandwich and one drink. Customers can order extra
drinks each for 0.5 JD. Also, customers can order extra sandwiches each for an extra 1.25 JD
o Family Meal: The base price of the meal is 5.00 JD. The meal comes with 3 regular sandwiches and 3 drinks. Customers can order extra
drinks each for 0.35JD. Also customers can order extra sandwiches each for extra 0.75 JD
Write a function named displayMenu that displays the following options for the user to select from
o RRegular Meal
o F- Family Meal
o Q- Exit the program
Write a function named getOption that calls the displayMenu function and prompts the user to enter one of the 3 letters. When an invalid
option code is detected, the function will display an error message, and then the menu displayed again until a valid option is used.
Write a function named getlnputs to read
a.
the number of extra sandwiches
b.
the number of extra drinks.
Write a function named billCalculator that takes as arguments the meal's type, number of extra sandwiches, and the number of extra
drinks. The function billCalculator returns the amount of money that the customer will be billed
The program (i.e. the main function) Should properly
o Call getOption to get the user choice
o Call getlnputs to read the number of extra sandwiches, and the number of extra drinks
o Call billCalculator and prints the amount of money that the customer will be billed
o The program should repeat the above steps until the user enters the Q option to exit
![o The program should repeat the above steps until the user enters the Q option to exit
Add your name, your University ID number and section number as a comment at the beginning of this program.
Sample Run
Welcome to Structured Resturant
Select one of the following options:
R- Regular Meal
F- Family Meal
Q- Exit the program
R
How many extra sandwiches?2
How many extra drinks?2
The bill amount is
5.500000
Select one of the following options:
R- Regular Meal
F- Family Meal
Q- Exit the program
Invalid Option
Select one of the following optians:
R- Regular Meal
F- Family Meal
Q- Exit the program](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe49307f1-caeb-475f-8f59-9bd76edfdeb9%2F9f656536-fdb0-4007-86bc-cd99777d298e%2F0738vij_processed.png&w=3840&q=75)
Transcribed Image Text:o The program should repeat the above steps until the user enters the Q option to exit
Add your name, your University ID number and section number as a comment at the beginning of this program.
Sample Run
Welcome to Structured Resturant
Select one of the following options:
R- Regular Meal
F- Family Meal
Q- Exit the program
R
How many extra sandwiches?2
How many extra drinks?2
The bill amount is
5.500000
Select one of the following options:
R- Regular Meal
F- Family Meal
Q- Exit the program
Invalid Option
Select one of the following optians:
R- Regular Meal
F- Family Meal
Q- Exit the program
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY