Code Monkey home page Code Monkey logo

2017-intern-challenge's Introduction

2017 Intern Challenge

===== Prerequisites

  1. PHP version 5.5 and above (this code is intended for php 7.1 but is backwards compatible)
  2. Composer if you want to run everything locally or Laravel Homestead if you want to run a virtual machine

Instructions

  1. Fork this repository to your personal github
  2. Clone that repository onto your local machine (or Homestead)
  3. run composer install in the repo directory from terminal, this will install all dependencies and the testing framework
  4. Complete the getProductTotal function of the App\Services\CashRegister class
  5. Complete the two empty tests in /tests/CashRegisterTest
  6. Run your tests by running vendor/bin/phpunit and returning 'OK (3 tests, x assertions)'
  7. Send a link to your fork to [email protected]

Database

Orders Table

id name
1 DRYV Order

Transactions Table

id order_id status amount currency
1 1 COMPLETE 400 USD
2 1 FAILED 600 USD
3 1 COMPLETE 600 USD

Products Table

id order_id quantity amount currency
1 1 1 200 USD
2 1 4 100 USD
3 1 2 200 USD

Notes

  • We use the Fowler money pattern so all the values you see are in the base currency unit (cents for USD)
  • The "total" of each product is its quantity x amount

Good luck!

2017-intern-challenge's People

Contributors

mdcurrent avatar mickeyschwab avatar

Watchers

James Cloos avatar  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.