Question: For this assignment, you will create a Java program that calculates the tax on an item and prints the item price, PA tax, local tax
For this assignment, you will create a Java program that calculates the tax on an item and prints the item price, PA tax, local tax and total onto the screen. Each item will be displayed on a separate line with a label, =, and $, as shown below. Prior to printing the item price, you will print 2 lines containing 20 hyphens per line (you must use a nested for loop to complete this task). Use the value 10.12 for the price of the item and assume the PA sales tax rate is 6% and the local sales tax is 1%. When you do your tax and total calculations, your values will compute to more than 2 decimal places, that's okay (we'll learn how to round to dollars and cents later). You must make use of both variables and a constant in your program. Be sure to name your constants and variables appropriately. Name your program with your last name and the number 2 . For example, I would name my program Alawami2.java Item Price =$4.95 PA Tax =$0.297 Local Tax =$0.0495 Total =$5.2965
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
