Question: Steps: 1. Create a new Java project in Eclipse named CalculateTotal 2. Create a new Java source file named CalculateTotal.java 3. Paste the code below

Steps:

1. Create a new Java project in Eclipse named CalculateTotal

2. Create a new Java source file named CalculateTotal.java

3. Paste the code below into your newly created file

4. Fix the bugs

5. Submit your corrected Java file.

Code:

import java.text.DecimalFormat;

/This program calculates a total based on merchandise total, shipping amount, and tax.

//It then outputs the total to the console.

public class CalculateTotal {

public static void main(string args) {

int ItemTotal = 500.50;

double Shipping = 10;

double TaxRate = .05

double SubTotal = ItemTotal + Shipping;

double Total = SubTotal + (SubTotal / Tax);

DecimalFormat df = new DecimalFormat("####.##"));

//Total should be 536.02

System.out.println("Your total is: $' + df.format(Total));

};

}

I need to know where the bugs are or any mistakes. I have some narrowed down but I hope I can get help.

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!