Lovely Warteg Lovely Warteg is a canteen that provides food service. The owner of this canteen is planning to make a program to make the transaction process of paying easier and more effective. You as a programmer are asked to create this program based on the criteria given using Java Programming Language. This application consists of 2 menus which are: Order Menu Exit Figure 1. Lovely Warteg Main Menu Order Menu The first option of the menu allows the user to order food through the program. The user is required to fill in a few user inputs which are: Ask the user to input the customer’s name. Validate that the customer’s name must be between 6 and 25 characters. Figure 2. Input Customer Name Ask the user to the input type of vegetable to eat. Validate that the vegetable must end with “Vegetable” (case sensitive). Figure 3. Type of vegetable Ask the user to the input type of meat to eat. Validate that meat must be either “Fish”, “Beef”, or “Chicken” (case sensitive). Figure 4. Input type of meat Ask the user to input portions of rice. Validate that the portions of rice must be numeric and between 1 and 5 plates. Figure 5. Input portions of rice Calculate the total price based on the type of meat and the portions of rice: The main formula for the total price is: Total price = [Type of Meat] + (1000 *s Portions of Rice)           Where the price of each type of meats is: Type of Meat Price Beef 20000 Fish 15000 Chicken 10000   Show customer’s name, vegetable orders, type of Meat, portions of rice, and total price based on the inputted data. Figure 6. Check out view Then ask the user to input the amount of cash that the Customer will pay. Validate the Amount of Cash must be greater or equal to the total price. If Customer’s amount of cash is greater than the total price, then output the Customer’s Figure 7. Input amount of cash Exit If the user chooses menu 2 (“Exit”), the application will be closed.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

Lovely Warteg

Lovely Warteg is a canteen that provides food service. The owner of this canteen is planning to make a program to make the transaction process of paying easier and more effective. You as a programmer are asked to create this program based on the criteria given using Java Programming Language.

This application consists of 2 menus which are:

  1. Order Menu
  2. Exit

Figure 1. Lovely Warteg Main Menu

  1. Order Menu

The first option of the menu allows the user to order food through the program. The user is required to fill in a few user inputs which are:

  • Ask the user to input the customers name. Validate that the customers name must be between 6 and 25 characters.

Figure 2. Input Customer Name

  • Ask the user to the input type of vegetable to eat. Validate that the vegetable must end with Vegetable” (case sensitive).

Figure 3. Type of vegetable

  • Ask the user to the input type of meat to eat. Validate that meat must be either “Fish”, “Beef”, or “Chicken” (case sensitive).

Figure 4. Input type of meat

  • Ask the user to input portions of rice. Validate that the portions of rice must be numeric and between 1 and 5 plates.

Figure 5. Input portions of rice

  • Calculate the total price based on the type of meat and the portions of rice:
  • The main formula for the total price is:

Total price = [Type of Meat] + (1000 *s Portions of Rice)

 

 

 

 

 

  • Where the price of each type of meats is:

Type of Meat

Price

Beef

20000

Fish

15000

Chicken

10000

 

  • Show customers name, vegetable orders, type of Meat, portions of rice, and total price based on the inputted data.

Figure 6. Check out view

  • Then ask the user to input the amount of cash that the Customer will pay.
  • Validate the Amount of Cash must be greater or equal to the total price.
  • If Customer’s amount of cash is greater than the total price, then output the Customer’s

Figure 7. Input amount of cash

  1. Exit

If the user chooses menu 2 (“Exit”), the application will be closed.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT