Coder Social home page Coder Social logo

multifruitbasket's Introduction

Multiple fruits in a basket

Build Status

The fruit basket business is booming. And customers now want fruit baskets with more than one fruit in it. Baskets now also needs a name to differentiate them from each other.

Create a new table called fruit_basket_item that contains:

1 type of fruit, a quantity of fruit and the unit price per fruit.

Create a new table called multi_fruit_basket it should have an id and a name column.

The fruit_basket_item table should have a multi_fruit_basket_id column that should be a foreign key to the id column in the multi_fruit_basket table.

Create a Factory Functions called MultiFruitBasket that should be able to:

create a new fruit basket for a given fruit type, qty & fruit price,

add fruits to an existing basket,

remove fruits from an existing basket - if there are no fruit left in the basket the basket should be removed,

for a given id return the basket_name & id as well as a list of all the fruits in the basket

return the total cost of a specific basket: based on basket name and on the basket id

Create tests for your function and deploy your tests to Travis.

multifruitbasket's People

Contributors

mafoloemmanuel 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.