Question: Java Question: Students will read in values to perform a computation. Read in three values: The name of an item, a single line The price

Java Question:

Students will read in values to perform a computation.

Read in three values:

  • The name of an item, a single line
  • The price of an item, a positive dollar value
  • The shipping fee rate, a value between 0.0 (free shipping) and 1.0 (equal to the cost).

Then print the costs of the item in the following format:

Costs for Chocolate Item Price: $20.00 Shipping Fee: $2.50 Total Cost: $22.50 

Use two places after the decimal point when displaying the costs.

Starting Code:

public class ShoppingOrders {

public static void main(String[] args) { // TODO: Write your program here. }

}

Java Question: Students will read in values to perform a computation. Read

INPUT OF THE TEST CASE 1 Pens 2 10 3 1 1 2 THE CORRECT OUTPUT OF THE TEST CASE 1 Costs for Pens 2 Item Price: $10.00 3 Shipping Fee: $10.00 4 Total Cost: $20.00 5 "UNIX DIFF OF CORRECT OUTPUT AND YOUR OUTPUT

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!