Question
The following pseudocode describes how a bookstore computes the price of an order from the total price and the number of the books that were
The following pseudocode describes how a bookstore computes the price of an order from the total price and the number of the books that were ordered.
Read the total book price and the number of books.
Compute the tax (7.5 percent of the total book price).
Compute the shipping charge ($2 per book).
The price of the order is the sum of the total book price, the tax, and the shipping charge.
Print the total price of the books, the amount of tax, the amount for shipping, and the total amount due for the order.
Translate this pseudocode into a Java program. A sample run is shown below. Your output should be formatted as shown below. The tax rate and shipping charge should be coded as constants in your program. Your program should prompt for the total price of the books and the number of books. The rest of the output is computed by your program. Be sure to test your program before you submit it. If your numbers are wrong, then your program is wrong.
run: Total price of books: 235.56 Number of books: 7 at Total price: $235.56 Tax: Shipping: Amount due BUILD SUCCESSFUL (total time: 15 seconds) $17.67 $14.00 $267.23
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