QUESTION 1 Write a program to help a KJM Cafe to automate their breakfast billing system. a) The program should do the following: • Show the customer the breakfast menu. • Ask the customer to select the food and the quantity, the drink and the quantity from the menu. Assume the user selects only one item for food and one item for drinks. • Calculate and print the bill. The process will repeat until the user requests it to stop. b) In addition, the program uses the following functions for processing. Write the definition of these functions below. • Function shoWMenu () : This function shows the breakfast menu as shown below. Function printBill(int,int,int,int): This function receives the food selection, the food quantity, the drink selection and the drink quantity. Then the function calculates and prints the bill (as shown below). The bill amount also includes 6% sales tax.

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...
icon
Related questions
Question
A sample breakfast menu:
Welcome to KJM Cafe
Food
1. Nasi Lemak
RM 3.00
2. Mee Goreng
RM 2.00
Drinks
1. Tea
2. Coffee
RM 0.70
RM 0.90
A sample output:
Welcome to KJM Cafe
Nasi Lemak
Teh
3
RM 9.00
3
RM 2.10
Sales Tax
Net Amount
RM 0.67
RM11.77
Transcribed Image Text:A sample breakfast menu: Welcome to KJM Cafe Food 1. Nasi Lemak RM 3.00 2. Mee Goreng RM 2.00 Drinks 1. Tea 2. Coffee RM 0.70 RM 0.90 A sample output: Welcome to KJM Cafe Nasi Lemak Teh 3 RM 9.00 3 RM 2.10 Sales Tax Net Amount RM 0.67 RM11.77
QUESTION 1
Write a program to help a KJM Cafe to automate their breakfast billing system.
a) The program should do the following:
• Show the customer the breakfast menu.
• Ask the customer to select the food and the quantity, the drink and the quantity from
the menu. Assume the user selects only one item for food and one item for drinks.
• Calculate and print the bill.
• The process will repeat until the user requests it to stop.
b) In addition, the program uses the following functions for processing. Write the definition
of these functions below.
• Function showMenu () : This function shows the breakfast menu as shown below.
• Function printBill (int,int,int,int): This function receives the food
selection, the food quantity, the drink selection and the drink quantity. Then the function
calculates and prints the bill (as shown below). The bill amount also includes 6% sales
tax.
Transcribed Image Text:QUESTION 1 Write a program to help a KJM Cafe to automate their breakfast billing system. a) The program should do the following: • Show the customer the breakfast menu. • Ask the customer to select the food and the quantity, the drink and the quantity from the menu. Assume the user selects only one item for food and one item for drinks. • Calculate and print the bill. • The process will repeat until the user requests it to stop. b) In addition, the program uses the following functions for processing. Write the definition of these functions below. • Function showMenu () : This function shows the breakfast menu as shown below. • Function printBill (int,int,int,int): This function receives the food selection, the food quantity, the drink selection and the drink quantity. Then the function calculates and prints the bill (as shown below). The bill amount also includes 6% sales tax.
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY