Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design an algorithm that calculates the sales tax and the price (amount due) of

ID: 3747920 • Letter: D

Question

Design an algorithm that calculates the sales tax and the price (amount due) of an item sold in a particular state. The sales tax is calculated as follows:

The state's portion of the sales tax is 4%

The city's portion of the sales tax is 1.5%

If the item is a luxury item, such as a car more than $50,000, then there is as 10% luxury tax.

Draw out a detailed problem analysis and the algorithm design.

Please show your steps neatly! I will rate thumbs up for the correct answer. Thank you in advance!

Explanation / Answer

Algorithm

Step1. Start

Step2. luxaruy-Tax = 0

Step3. Read item_Price

Step4. Read item_Type

Step5. Calculate state_Tax = item_Price * 4 / 100

Step6. Calculate city_Tax = item_Price * 1.5 / 100

Step7. if item_Price > 50000 and item_Type = "Luxary" then

7.1 Calculate luxary_Tax = item_Price * 10 / 100

Step8. Calculate total_Sales_Tax = state_Tax + city_Tax + luxary_Tax

Step9. Write total_Sales_Tax

Step10. Stop

Description: Based on the problem given, state's portion of the sales tax(state_Tax) and city's portion of the sales tax(city_Tax) is calculated with respective to price (amount due).Luxary tax is applicable if and only if the item_Price is greater than $50000 and item_Type is "Luxary". The total sales tax will be

total_Sales_Tax = state_Tax + city_Tax + luxary_Tax

Finally display the total_Sales_Tax.

Algorithm

Step1. Start

Step2. luxaruy-Tax = 0

Step3. Read item_Price

Step4. Read item_Type

Step5. Calculate state_Tax = item_Price * 4 / 100

Step6. Calculate city_Tax = item_Price * 1.5 / 100

Step7. if item_Price > 50000 and item_Type = "Luxary" then

7.1 Calculate luxary_Tax = item_Price * 10 / 100

Step8. Calculate total_Sales_Tax = state_Tax + city_Tax + luxary_Tax

Step9. Write total_Sales_Tax

Step10. Stop

Description: Based on the problem given, state's portion of the sales tax(state_Tax) and city's portion of the sales tax(city_Tax) is calculated with respective to price (amount due).Luxary tax is applicable if and only if the item_Price is greater than $50000 and item_Type is "Luxary". The total sales tax will be

total_Sales_Tax = state_Tax + city_Tax + luxary_Tax

Finally display the total_Sales_Tax.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote