Git Product home page Git Product logo

airport_challenge's Introduction

#Airport Challenge Build Status

My solution to airport challenge.

Uses classes Plane and Airport and a Weather module.
All user stories covered with unit and feature testing, following BDD process.
Unit tests are isolated using doubles.

####Installation
git clone [email protected]:hibreez/airport_challenge.git
cd airport_challenge
gem install bundle
bundle

####Usage

airport = Airport.new       #==> #<Airport:0x007f... @capacity=20, @planes=[]>
airport.stormy?             #==> false
plane = Plane.new           #==> #<Plane:0x007ff84c85fbf0 @flying=true>
airport.land! plane         #==> [#<Plane:0x007... @airport=#<Airport:0x007... @capacity=20, @planes=[...]>, @flying=false>]
plane.flying?               #==> false

Airport class controls takeoffs and landings, instructing planes to update their status accordingly.
for example:
airport.land! plane - the airport will instruct the plane to land, if possible, adding it to the plane storage
triggering:
plane.land! airport - updating the status of the plane to be grounded at the airport

Weather module provides method .stormy? which returns a boolean based on a random number.

####Object/Messages Table

Object Messages
Plane land
take off
flying?
at airport?
Airport/ instruct land
Controller prevent land
confirm land
instruct takeoff
prevent takeoff
confirm takeoff
check full?
check weather?
default capacity
set capacity
Weather stormy?

airport_challenge's People

Contributors

tansaku avatar angusjfw avatar silvabox avatar dbugsy avatar leoallen85 avatar spike01 avatar bebbs avatar mihailiviucojocar avatar nikeshashar avatar

Watchers

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