Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that will first input (read from the console) the name and address of a store. Then it will input the name, quantity,

Write a program that will first input (read from the console) the name and address of a store. 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.

THE FOLLOWING QUESTION SHOULD NOT HAVE ARRAYS AND BE THE SAME AS THE OTHER QUESTIONS!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago