Question: In this program, you will purchase an new tablet or laptop. Sample run: Enter the your name: Hello John, are you buying a tablet or

In this program, you will purchase an new tablet or laptop.
Sample run:
Enter the your name:
Hello John, are you buying a tablet or laptop?
Enter the amount for your tablet:
You entered: $735.00
Tax: $58.0
Total Cost: $793.0
*/
import java.util.Scanner;
public class ComputerPurchase
{
private static Scanner CONSOLE = new Scanner(System.in); // Declare and instantiate console as a Scanner
private static double SALES_TAX =0.08; // Declare a named constant for the sales tax (SALES_TAX) and assign .08 to the variable
public static void main(String[] args)
{
String strName = "Acer Laptop";
String strDevice = "Laptop";
double dblAmount ="$735.00";
double dblTaxes ="$58.00";
double dblTotalCost = $793.00";
//Declare the below variables and initialize them to their default values.
strName, strDevice, dblAmt, dblTaxes, dblTotalCost
System.out.print("Enter your name: ");
// Prompt for and input the users name.
// Prompt for and input the type of device the user is buying
// Prompt for and input the device amount
// Display to the user the amount entered and go to the next line.
// Calculate the taxes using the constant variable above.
// Display the taxes and go to the next line.
// Calculate the Total Cost
// Display the Total Cost.
}
}

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 Programming Questions!