ou are asked to develop a program to create an intelligent food menu pricing algorithm to solve this problem for restaurant owners. This algorithm will take maximum capacity (MC), current customers (CC), staff shortage (SS), and the original menu items information as input. Based on some conditions, menu items prices will vary from one customer to another. Here are the pricing conditions: The food items in a menu can be categorized into four types: Famous (F): items that customers always order. Regular (R): items that customers frequently order. Limited (L): items that customers rarely order. If restaurant busyness is or below 50% then Famous items are priced at their base price. Regular items are priced with a discount of 20% of their base price. Limited items are priced with a discount of 50% of their base price. If restaurant busyness is more than 50% then Famous items are priced with an increase relative to the restaurant’s busyness. For example, if the restaurant is 75% full, all famous items are increased by 75% of the base price. Regular items are priced with an increase of 25% of the base price. Limited items are priced at their base price. The busyness is a value computed by dividing Current Customers by the Max Customers in the restaurant (CC/MC). It is given as a percentage (Integer). The menu items are listed in this format: Cheeseburger 40 F Sandwich 80 L Cheesecake 70 F Pizza 70 R Falafel 60 R Eggroll 35 F Burrito 90 F Where each menu item name is followed by its Price, and Category (F, R, L) This new system of pricing help restaurants to make up for the losses of heavy-traffic hours and attract customers to plan their visits during the low-traffic hours. Your program reads the number of current customers (CC), Max capacity (CC) to determine new prices for the menu items. Input Format The program reads two integer values MC and CC. Constraints CC <= MC Output Format List of items with the new menu price. All values are given in Integers. Sample Input 0 10 30 Sample Output 0 40 40 70 56 48 35 90

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

You are asked to develop a program to create an intelligent food menu pricing algorithm to solve this problem for restaurant owners. This algorithm will take maximum capacity (MC), current customers (CC), staff shortage (SS), and the original menu items information as input. Based on some conditions, menu items prices will vary from one customer to another.

Here are the pricing conditions: The food items in a menu can be categorized into four types:

  • Famous (F): items that customers always order.
  • Regular (R): items that customers frequently order.
  • Limited (L): items that customers rarely order.

If restaurant busyness is or below 50% then

  • Famous items are priced at their base price.
  • Regular items are priced with a discount of 20% of their base price.
  • Limited items are priced with a discount of 50% of their base price.

If restaurant busyness is more than 50% then

  • Famous items are priced with an increase relative to the restaurant’s busyness. For example, if the restaurant is 75% full, all famous items are increased by 75% of the base price.
  • Regular items are priced with an increase of 25% of the base price.
  • Limited items are priced at their base price.

The busyness is a value computed by dividing Current Customers by the Max Customers in the restaurant (CC/MC). It is given as a percentage (Integer).

The menu items are listed in this format:

Cheeseburger 40 F

Sandwich 80 L

Cheesecake 70 F

Pizza 70 R

Falafel 60 R

Eggroll 35 F

Burrito 90 F

 

Where each menu item name is followed by its Price, and Category (F, R, L)

This new system of pricing help restaurants to make up for the losses of heavy-traffic hours and attract customers to plan their visits during the low-traffic hours.

Your program reads the number of current customers (CC), Max capacity (CC) to determine new prices for the menu items.

Input Format

The program reads two integer values MC and CC.

Constraints

CC <= MC

Output Format

List of items with the new menu price. All values are given in Integers.

Sample Input 0

10

30

 

Sample Output 0

40

40

70

56

48

35

90

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Random Class and its operations
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning