Git Product home page Git Product logo

smart-fridge-kata's Introduction

Smart Fridge Kata

This Kata has been designed as a final hands-on exam for undergraduate students at IUT Charlemagne.
It borrows many ideas from Gilded Rose and Trip Service.
Kudos to Emily Bache and Sandro Mancuso for these amazing kata !

Welcome to Smart Stuff Society !

You are now in charge of our SmartFridge™ internal software. Your job is to implement the next update, detailed in the todo section.
The original developper left few weeks ago, telling us "the code is a little messy" so feel free to refactor it as you wish !
However, you MUST NOT change the files in the protocol subpackage.

Current system

  • every day, the fridge run the following routine
    • scan every new products
    • update the freshness of all products
    • destroy all expired products (freshness <= 0)
  • freshness update is done according to the following rules
    • for type eternal, it never decreasess
    • for type yogourt, it decreasess by 5% per day
    • for type vegetable, it decreasess randomly by 20% to 25% per day
    • for type mushroom, it decreasess by 10% per day while it is greater than 50%, and then decreases by 5% per day
    • for type meat, it decreases by 10% per day during a random number of days between 3 and 5, and then decreases by 20% per day
    • for others type, it decreases randomly by 5% to 15% per day
  • the fridge also has the following features:
    • list all the products expiring tomorrow
    • list all the products with a set of tags
  • the fridge is supplied with our SmartRecognitionEngine™, which gives these informations when detecting new products
    • a name
    • a type of product (e.g. meat, vegetable, fruit...)
    • a set of tags (e.g. sweet, salty, healthy, organic...)

Todo

Our customers reported that the fridge quickly becomes slow and needs frequents reboot since the meat update, you need to investiguate !

We want to introduce two new types with the following rules

  • type egg, freshness decrease by 3% per day
  • type fruit, freshness decreases by 5% per day while it is greater than 60%, and then decrease by 15% per day

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.