Giter Club home page Giter Club logo

wdi_week2_day1_quiz's Introduction

Week2 Day 1 Grocery Store Order tracker

###Type:

  • Quiz

###Time Required:

  • 30 minutes

###Prerequisites:

  • Ruby
    • Objects/Classes
    • Initializer
    • Accessors
    • Multi-file projects ('require')

###Objectives:

  • Split a ruby application into multiple files.

###Activity:

  • We have a small grocery store that would like to keep track of all orders.

###Explanation

  • You are going to create grocery orders
  • Make git commits as you finish each phase, so you can see the history

###Specification: #####Object Specs:

  • Product Type:

    • A product type should have an id.
    • A product type should have a name.
    • A product type should have a price.
    • A product type should have a description (optional).
  • Order Item:

    • An order item should have a product type.
    • An order item should have a quantity of the product type ordered.
    • An order item should have a unit price (this may be different than the product price)
  • Order

    • And order should have an order id
    • And order should have one or more order items.
    • And order should have a complete_xaction method that will log (see below)..
  • Log:

    • A log entry should be created for each product type created.
    • A log entry should be create for each order. Logging the order including it's order items.
    • Each log entry should be shown on the command line for each order.

#####Phase 1

  • Define classes, including a Log mixin.

#####Phase 2

  • Calcuate the price of one order.
  • Keep a running sum of all orders, (use Array#inject method?).

#####Extra

  • Keep all the classes in the GA namespace.
  • How could one use inheritence to improve the design of the product type?
  • Log to the OSX 'say' command as well as to stdout.

###Post-mortem:

  • What worked?

wdi_week2_day1_quiz's People

Contributors

micfin avatar tdyer 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.