Question: This exercise requires designing a program which solves the problem described in the problem statement below. Provide comments in your pseudo-code and Java program as

This exercise requires designing a program which solves the problem described in the problem statement below. Provide comments in your pseudo-code and Java program as necessary.

For this Assignment, you may use Flowgorithm to generate pseudo-code and Java code.

The components that comprise your solution are described below:

  1. Flowchart. Use Lucidchart to complete this part of the assignment. Keep in mind that even though Flowgorithm uses mostly standard flowchart symbols, the result is not a standard flowchart. Use examples in your text and the Practice Problem above as a guide for completing your flowchart. Flowchart examples in the text and Canvas provide a standard for this and all future assignments!

You should save and download your flowchart from Lucidchart as a PNG file and insert it into your Word Assignment file.

  1. Pseudo-code. Obtain pseudo-code for your Assignment from Flowgorithm by (1) selecting Tools and Source Code Viewer, (2) clicking the dropdown list arrow and (3) selecting Gaddis Pseudo-code (the type of pseudo-code from several options used in your text). Click the Copy to Clipboard icon after the pseudo-code is displayed, and then paste it into the Word Assignment file.

  2. Program Coded. Obtain Java Code from Flowgorithm by (2) selecting Tools and Source Code Viewer, (2) clicking the dropdown list arrow and (3) selecting Java. Click the Copy to Clipboard icon after the Java code is displayed, and then paste it into the Word Assignment file.

  3. Program Output. For this assignment, obtain a screen shot of the output from your Flowgorithm program. Copy/paste the screen shot to your Word document.

Problem Statement

Design a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax.

  1. Assume the state sales tax rate is four (4) percent and the county sales tax rate is two (2) percent.

  2. The program should display the:

    1. Amount of the purchase

    2. The state sales tax amount

    3. The county sales tax amount

    4. The total sales tax amount

    5. Total of the sale (which is the sum of the amount of purchase plus the total sales tax amount)

Hint: Use the value 0.02 to represent 2 percent, and 0.04 to represent 4 percent. These will need to be values of type real because they have decimal places.

Expected Output

Enter the amount of the purchase.

100

Purchase Amount: $100.00

State Tax: 4.00

County Tax: 2.00

Total Tax: 6.00

Sale total: 106.00

Note: The numbers in your results will probably have only one decimal place unless you format them to have two decimal places (we'll get to that).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!