Giter Club home page Giter Club logo

shopping-cart's Introduction

shopping-cart

Build Status

to pass input arguments from terminal: sbt "run apple apple orange orange orange"

or you could pass from intellij

Pre-interview Exercise for Developer Candidates

The following exercise will assess your ability to deliver well structured and maintainable code. As a TDD shop we will put equal emphasis on evaluating your tests as we will on the code itself. The exercise should only take 30 40 minutes; don’t spend much longer than this.

Please complete the following exercise in either Scala or Java. If this exercise goes well, you may be asked to make further amendments to your code during a pair programming exercise with a member of the team. Please pick the language you think you will be best able to demonstrate your skill and experience.

Please use git to version control your exercise. After completing the first step, please clearly tag the commit so that we can evaluate your approach. You may make other commits to further demonstrate your approach. Please compress your answers and submit them via your agent or send us a link to your Github (or similar) account. Do not send us binaries, they won’t get through our firewalls.

Complete the steps in order. Don’t read ahead. At each step build the simplest possible solution which meets our requirement. Tag a git commit after each step so that your approach is clear.

Your answers will be used as part of our sifting and are likely to be discussed with your interviewer at later stages.

Step 1: Shopping cart

  • You are building a checkout system for a shop which only sells apples and oranges.
  • Apples cost 60p and oranges cost 25p.
  • Build a checkout system which takes a list of items scanned at the till and outputs the total cost
  • For example: [ Apple, Apple, Orange, Apple ] => £2.05
  • Make reasonable assumptions about the inputs to your solution; for example, many candidates take a list of strings as input

Step 2: Simple offers

  • The shop decides to introduce two new offers
    • buy one, get one free on Apples
    • 3 for the price of 2 on Oranges
  • Update your checkout functions accordingly

shopping-cart's People

Contributors

avinash-anand 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.