Question: This is a java problem. In this problem, we're going to create a program to calculate the total price of a recipe. Since we don't
This is a java problem.
In this problem, we're going to create a program to calculate the total price of a recipe. Since we don't yet have the tools to solve this problem "generically", the recipe will follow a specific format (as you can see in the code template): It will contain exactly three lines .Each line will consist of two numbers: a quantity, and a price The quantity is guaranteed to be the first number on each line Each quantity is guaranteed to consist of two numeric characters The price will immediately follow a dollar sign () Each price will consist of five characters: two numbers, followed by a decimal point, followed by two numbers Your program must then output the total cost of the recipe, where the cost of a single line is the quantity multiplied by the cost. Obviously you could do this with a calculator, but then you wouldn't learn anything, would you? An example of the input and output: 20 $15.00 Chicken 08 Marinade will cost $07.82 03 I think $00.99 Seasoning Total recipe price: 365.53000000000003
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
