My interview coding test

Here is the coding test I created when interviewing candidates.

The first test to pass is a simple logic test.  You can verify the numbers with a calculator without even touching code.  So if the numbers come in wrong that is a bad sign!

 

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

During a sale all books within the Crime category are discounted by 5%

Total tax for the whole order is 10%

Write a console application with unit tests that outputs the total order cost (with and without total tax) for the following 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      |