My interview coding test

Technical Test – Book Store

An online books store sells books for 3 different categories: Crime, Romance, Fantasy.

Currently all books within the Crime category are discounted by 5%

Total tax for the whole order is 10%

The task

Write a simple console application that outputs the total order cost with and without tax for the below purchase:

|           Book name                            |           Category        |           Total Cost   |
|           Unsolved crimes                   |           Crime              |           10.99           |
|           A Little Love Story                |           Romance        |           2.40              |
|           Heresy                                     |           Fantasy           |           6.80             |
|           Jack the Ripper                      |           Crime              |           16.00            |
|           The Tolkien Years                  |          Fantasy           |           22.90            |

Guidelines

  1. The application should be runnable in Visual Studio / Code via F5
  2. The code should be accessible on the public/private Git repo.

Hint:  you could manually calculate your answer first to confirm your logic is sound!

For extra points its great to see any type of unit tests including

1. Add item
2. Discount for category
3. Total tax added
4. Total order summed
4. Category discount
6. Cost without tax – no discount
7. Cost without tax – with discount
8. Cost with tax – no discount
9. Cost with tax – no discount