Skip to content

Tiziano-92/sales-taxes-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sales taxes solution

This project contains the solution (implemented in Java language) for the Sales Taxes problem which can be viewed at this link.

Requirements

  1. Java JDK >=8. Not the JRE

    Ensure that the java command is in the PATH and is using version 8. For example:

    > java -version 
    java version "1.8.0_66"
    Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

    If the kernel cannot start, with an error along the lines of

    Exception in thread "main" java.lang.NoClassDefFoundError: jdk/jshell/JShellException
            ...
    Caused by: java.lang.ClassNotFoundException: jdk.jshell.JShellException
            ...
    

    then double check that java is referring to the command for the jdk and not the jre.

  2. Apache Ant

    Ensure that the ant command is in the PATH. For example:

        > ant -version 
        Apache Ant(TM) version 1.10.1"

Run Locally

  1. Clone this repo.

        > git clone https://gitlab.com/tiziano92/sales-taxes-problem.git
  2. Go into the project's folder.

        > cd sales-taxes-problem
  3. Compile the project.

        > ant compile
  4. Run the program

        > ant execute.TestRunner

Directory Tree

./src
├── entities
│   ├── Good.java
│   ├── ImportedGood.java
│   ├── NonImportedGood.java
│   ├── Receipt.java
│   ├── ShoppingBasket.java
├── exceptions
│   ├── GoodNotFoundException.java
│   ├── ShoppingBasketNotFoundException.java
├── good_types
│   ├── GoodType.java
├── helper
│   ├── Helper.java
├── interfaces
│   ├── GoodInterface.java
│   ├── ReceiptInterface.java
│   ├── ShoppingBasketInterface.java
├── test
    ├── ReceiptJUnit.java
    ├── TestRunner.java
    ├── result.txt
    

6 directories, 15 files

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages