Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 parameters of type int, and returning a String as specified below.
You method should calculate the total cost of ordering 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 Steak Dinner:
Meal Steak & Lobster Dinner:
Meal Vegetarian Extravaganza:
Meal Chicken Dinner:
Input looks like: mealCount mealCount mealCount mealCount
Meal Tax is: multiply mealTotal by and add it to the taxTotal
Standard Tip is: multiply mealTotal by 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started