Question: Need to correct syntax and logic errors //This program calculates the total price which includes sales tax import java.util.Scanner; public class SalesTax { public static

Need to correct syntax and logic errors

//This program calculates the total price which includes sales tax

import java.util.Scanner;

public class SalesTax

{

public static void main(String[] args)

{

//identifier declarations

final double TAX_RATE = 0.055;

double price;

double tax

double total;

String item;

//create a Scanner object to read from the keyboard

Scanner keyboard = new Scanner(System.in);

//display prompts and get input

System.out.print("Item description: ");

item = keyboard.nextLine();

System.out.print("Item price: $");

price = keyboard.nextDouble();

//calculations

tax = price + TAX_RATE;

totl = price * tax;

//display results

System.out.print(item + " $");

System.out.println(price);

System.out.print("Tax $");

System.out.println(tax);

System.out.print("Total $");

System.out.println(total);

}

}

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!