Giter Site home page Giter Site logo

airport's Introduction

Week 3 Test: Airport

After gaining more experience i repeated the test here

Technologies used: RSpec, Ruby

Imagine you're writing software to control the flow of planes at an airport. The planes can land and take off provided that the weather is sunny. Occasionally it may be stormy, in which case no planes can land or take off.

Your task is to create a set of classes/modules to make the given test suite pass. You will need to use a random number generator to set the weather (it is normally sunny but on rare occasions it may be stormy). In your test, you'll need to use stubbing to override random weather. Finally, every plane must have a status indicating whether it's flying or has landed. You may expand on the original tests.

Basic functionality:

  • Planes are flying by default
  • Airport can be set with a certain capacity
  • Weather generated randomly
  • Planes can land if the weather is good
  • Planes cannot land if the weather is stormy
  • Planes cannot land if the aiport is full

###Rules Please create separate files for every class, module and test suite. Commit it to a repo on GitHub by 5pm.

The submission will be judged on the following criteria:

  • Tests pass
  • Test coverage is good
  • The code is elegant: every class has a clear responsibility, methods are short, etc.

The tests are located at: https://gist.github.com/shadchnev/5684064
Or the RSpec equivalent: https://gist.github.com/ecomba/2fb61ab115080599f8d8

airport's People

Contributors

ab-thomas avatar

Watchers

 avatar  avatar

Forkers

shadchnev

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.