Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with this situation. Tks (Java program) Use basic String Assignment1/ 3. Problem 3: Sales Tax Rates saved 10 points possible Reset to
I need help with this situation. Tks (Java program)
Use basic String
Assignment1/ 3. Problem 3: Sales Tax Rates saved 10 points possible Reset to Starter Code Problem Description The third problem builds on and extends your current program further. You will be expected to calculate the tax rate for an item to be purchased by the customer. Next, add the tax rate to the cost of the time. Print as output of the program the current balance, in other words, the difference between the cost of the item to purchase and the amount given by the customer. Input You will receive from the user) the following as input (in order): The first and last name of the customer (e.g., Eric Poitras) The item to be purchased, identified through a barcode number (e.g., 1909238092] The cost of the item to be purchased by the customer (e.g., 8.50) The cash amount given by the customer (e.g., 10.00) Processing 1. Extract the product id and company id numbers 2. Calculate the balance for the transaction 3. Print the data stored in each variable in the corresponding format Output 1. Customer (Last, First): {LAST} {FIRST) 2 Item Number (Product, Company): {PRODUCT} {COMPANY} 3. Item Cost (+ Sales Tax): {COST} 4. Change: {CASH} Hint: You will need to format the output of the absolute amount of the current balance to two decimal points. Examples Input Eric Poitras Output Customer (Last, First): Poitras Eric 1909238092 Item Number (Product, Company]: 8092 19092 8.50 Item Cost (+ Sales Tax): 9.77 10.00 Angela Siegel Change: 0.23 Customer (Last, First): Siegel Angela 1909238095 Item Number (Product, Company): 8095 19092 7.5 Item Cost (+ Sales Tax): 8.63 10.0 Change: 1.38
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started