PROBLEM DESCRIPTION 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 items are purchased a receipt is received 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.
SETUP ENVIRONMENT
- If Java is not running on your system, then download it using [this link] (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
- Set the CLASSPATH so that Java can run on your system.
- Download Apache Ant. If on OSX, then use [Home Brew] (http://brew.sh/). Use the command
brew install ant
and download it. ...If on any other Operating System, then use [this link] (https://ant.apache.org/bindownload.cgi)
HOW TO BUILD THE CODEBASE
- Open a Terminal and type
ant build
to build the codebase.
HOW TO RUN THE CODEBASE
- Open a Terminal and type
ant
to run it.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.