Question: Define a method findMenuCost ( ) that takes two integer parameters as the menu chosen and the number of people attending a dinner, and returns

Define a method findMenuCost() that takes two integer parameters as the menu chosen and the number of people attending a dinner, and returns the menu's cost per person as an integer. The cost of the menu is returned as follows: Define a method findMenuCost() that takes two integer parameters as the menu chosen and the number of people attending a
dinner, and returns the menu's cost per person as an integer. The cost of the menu is returned as follows:
Cost per person
If menu number is not in the above table, return 125.
Ex: If the input is 125, then the output is:
85 public class MenuFinder {public static void main(String[] args){ int menuNumber; menuNumber = scnr.nextInt(); System.out.println(findMenuCost(menuNumber, numGuests));}
Cost per person
Menu =30 people 31-130 people >130 people
1856030
2604540
3805545
If menu number is not in the above table, return 125.
Ex: If the input is 125, then the output is:
85
Define a method findMenuCost ( ) that takes two

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!