Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

readme.md

SALES TAXES

Problem:

Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical products that are exempt. Import duty is an additional sales tax applicable on all imported goods at a rate of 5%, with no exemptions.

When I purchase items I receive a receipt which lists the name of all the items and their price (including tax), finishing with the total cost of the items, and the total amounts of sales taxes paid. The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains (np/100 rounded up to the nearest 0.05) amount of sales tax.

Write an application that prints out the receipt details for these shopping baskets...

Running the code:

To run the code with the sample input files provided:

  1. Import project into intellij
  2. Create run configuration for the main method in SalesTaxApp with the following settings: Main class: SalesTaxApp Program Arguments: sample/input/sample_input1.txt sample/input/sample_input2.txt sample/input/sample_input3.txt Working directory: /Users/Thoughtworker/PersonalProjects/practice_problems/java/SalesTax