Question: need some help with this java Program please. Write a program ( ProductsInvoice.java ) that will first input (read from the console) the name and
need some help with this java Program please.
Write a program (ProductsInvoice.java) that will first input (read from the console) the name and address of a store (e.g., BestBuy, Cub Foods, etc). Then it will input the name, quantity, and the price of three products. The name and address of the store and the products name may contain spaces.
Output an invoice with the stores name and address on the top right corner followed by the three products in three different lines. In each line display the name, the price, the quantity and the total. You need to calculate the total, which is the price multiplied by the quantity. You will also need to output the following:
Subtotal: this is the products total before tax.
Sales Tax: use 7.625% for the tax rate.
Total: this is the total after tax.
All prices, totals and subtotal should be displayed in US currency format (e.g., $1,000). The invoice should be formatted in columns with 70 characters for the stores name, 70 characters for the stores address, 30 characters for the products name, 10 characters for the products quantity, 15 characters for products price, and 15 characters for the products total.
Formatting: For the prices, totals and subtotal use NumberFormat class and to display the invoice using columns use printf.
Input Validation: your program should NOT accept negative values and empty strings. When the user enters an invalid input your program should ask him/her to try again (See the second screed shot below).
here is how the ouput should look like!

Enter Store's name: Apple Store Enter Store's address: 1234 grand ave, St Paul MN 55112 Enter details of product 1 Name: Iphone 6s Price: 699.99 Quantity: Enter details of product 2 Name Apple Watch S2 Price 399.99 Quantity: Enter details of product 3 Name Apple Tv Price: 299.99 Quantity: Iphone 6s Apple Watch S2 Apple TV Subtotal Sales Tax (7.625% Total Apple Store 1234 grand ave, St Paul MN 55112 $699.99 $699.99 $399.99 $799.98 $299.99 $899.97 $2,399.94 $183.00 $2,582.94
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
