Giter VIP home page Giter VIP logo

takeaway-challenge's Introduction

Takeaway Challenge

Benny's Notes

  • I did not have enough time to get as far as I would have liked to
  • What is still missing is the completion of the customer class, a UI to bridge the Customer class and Restaurant class, and a separate class for sending messages via Twilio. Otherwise I think I am pretty much there.

Instructions

  • Challenge time: Friday, the entire day + the weekend if you need it
  • Feel free to use google, your notes, books, etc but work on your own
  • You must submit a pull request to this repo with your code by 9am Monday morning

Task

  • Fill out your learning plan self review for the week: https://github.com/makersacademy/learning_plan (if you haven't already)
  • Fork this repo
  • run the command 'bundle' in the project directory to ensure you have all the gems
  • Write a Takeaway program with the following user stories:
As a customer
So that I can check if I want to order something
I would like to see a list of dishes with prices

As a customer
So that I can order the meal I want
I would like to be able to select some number of several available dishes

As a customer
So that I can verify that my order is correct
I would like to check that the total I have been given matches the sum of the various dishes in my order

As a customer
So that I am reassured that my order will be delivered on time
I would like to receive a text such as "Thank you! Your order was placed and will be delivered before 18:52" after I have ordered
  • Hints on functionality to implement:

    • ensure you have a list of dishes with prices
    • place the order by giving the list of dishes, their quantities and a number that should be the exact total. If the sum is not correct the method should raise an error, otherwise the customer is sent a text saying that the order was placed successfully and that it will be delivered 1 hour from now, e.g. "Thank you! Your order was placed and will be delivered before 18:52".
    • The text sending functionality should be implemented using Twilio API. You'll need to register for it. It’s free.
    • Use the twilio-ruby gem to access the API
    • Use a Gemfile to manage your gems
    • Make sure that your Takeaway is thoroughly tested and that you use mocks and/or stubs, as necessary to not to send texts when your tests are run
    • However, if your Takeaway is loaded into IRB and the order is placed, the text should actually be sent
  • A free account on Twilio will only allow you to send texts to "verified" numbers. Use your mobile phone number, don't worry about the customer's mobile phone.

  • Finally submit a pull request before Monday at 9am with your solution or partial solution. However much or little amount of code you wrote please please please submit a pull request before Monday at 9am

Note: We are looking for good OO design and programming! Remember the Single Responsibility and Dependency Injection/Inversion principles!

Build Status Coverage Status

takeaway-challenge's People

Contributors

tansaku avatar bk8296 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.