Question: Calculate the Bill, including a Tip & Tax Write a static method called calculateCost ( ) , with 4 parameters of type int, and returning

Calculate the Bill, including a Tip & Tax
Write a static method called calculateCost(), with 4 parameters of type int, and returning a String as specified below.
You method should calculate the total cost of ordering 4 different meals. The number of meals of each type will be input by the console and given to your method. Your method should add the cost of each type of meal, calculate the Meal Tax, calculate the Tip, and print the total cost.
Meal costs:
Meal 1(Steak Dinner): 45
Meal 2(Steak & Lobster Dinner): 95
Meal 3(Vegetarian Extravaganza): 30
Meal 4(Chicken Dinner): 30
Input looks like: mealCount1, mealCount2, mealCount3, mealCount4
Meal Tax is: 8%(multiply mealTotal by .08 and add it to the taxTotal)
Standard Tip is: 15%(multiply mealTotal by .15 and store in tipTotal)
Output should look like: "The total cost for this meal is $"+ n where n is the cumulative total of the meal, the tax & the tip. in java

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 Databases Questions!