GithubHelp home page GithubHelp logo

takeaway-challenge's Introduction

Takeaway Challenge - Makers Academy Weekend Challenge 2

==================

                            _________
              r==           |       |
           _  //            |  M.A. |   ))))
          |_)//(''''':      |       |
            //  \_____:_____.-------D     )))))
           //   | ===  |   /        \
       .:'//.   \ \=|   \ /  .:'':./    )))))
      :' // ':   \ \ ''..'--:'-.. ':
      '. '' .'    \:.....:--'.-'' .'
       ':..:'                ':..:'

Using this program

This challenge was set as our second independent weekend challenge at Makers Academy. It allowed me to further practice interpreting user stories into code using test driven development practices. This challenge allowed me to understand breaking one class into two classes that work together and maintaining test coverage and unit test classes in isolation using mocking.

irb
require './lib/takeaway.rb'
takeaway = Takeaway.new
takeaway.print_menu
=> {"Chicken_Katsu_Curry"=>13, "Veggie_Katsu_Curry"=>12, "Ramen"=>10, "Edamame"=>3, "Gyoza"=>5}
takeaway.add_item("Gyoza", 2)
takeaway.add_item("Gyoza",2)
=> 2
takeaway.add_item("Ramen", 3)
=> 3
takeaway.view_order
2x Gyoza: £10
3x Ramen: £30
 => 40
takeaway.confirm_order

What i learned from this Challenge

  • More practice using OO design and making sure classes are only responsible for one thing
  • Using hashes in Ruby
  • How to incorporate third party API's and ensure correct gems are installed

takeaway-challenge's People

Contributors

tansaku avatar silvabox avatar fahus avatar dbugsy avatar neoeno avatar katerina-codes avatar ptolemybarnes avatar anitacanita avatar david-mears avatar dearshrewdwit avatar roidriscoll avatar sdorunga avatar

Watchers

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