Giter Club home page Giter Club logo

msm.techtest.consoleapplication's Introduction

Money Super Market Technical Test

Price calculation exercise

Create a customer basket that allows a customer to add products and provides a total cost of the basket including applicable discounts.

Available products

Product Cost
Butter £0.80
Milk £1.15
Bread £1.00

Offers

  • Buy 2 Butter and get a Bread at 50% off
  • Buy 3 Milk and get the 4th milk for free

Scenarios

  • Given the basket has 1 bread, 1 butter and 1 milk when I total the basket then the total should be £2.95
  • Given the basket has 2 butter and 2 bread when I total the basket then the total should be £3.10
  • Given the basket has 4 milk when I total the basket then the total should be £3.45
  • Given the basket has 2 butter, 1 bread and 8 milk when I total the basket then the total should be £9.00

The solution should be in C#.

Pointers

While we are looking for a solution that shows a good understanding of the SOLID principles, object�oriented programming (or functional) and that displays a working knowledge of TDD (a git repository will be appreciated!), please keep things simple- do not over-engineer anything, make sure your code is manageable and easy to follow. We are not looking for submissions that contain UIs or databases.

If you think your solution is too short, feel free to add some commentary to justify the decisions you have taken, if possible, by quoting books, blog posts or talks that have influenced you in the way you have coded.

Above all, code as if you're coding for yourself

Test Results

Screenshot 2021-11-22 at 01 37 04

msm.techtest.consoleapplication's People

Contributors

muhammadzeeshaan avatar mztariq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.