GithubHelp home page GithubHelp logo

airport_challenge's Introduction

AIRPORT CHALLENGE

This is a test-drive of a system to control the flow of aircraft at an airport:

  • Aircraft can land at an airport and take-off from the airport
  • Airports check the weather to ensure it is safe for take-off and landing of planes
  • Airports have a fixed capacity for planes that can be set on initialization (defaults to 50)
  • Planes will communicate with airports and only take-off or land with permission from the airport control

Classes:

Airport

Main methods are:

  • .land (plane) : Allows a plane to land at the airport
  • .release_for_takeoff (plane) : Allows a plane to take off

Other public methods:

  • .expecting? (plane) : returns whether the airport is expecting the plane to land
  • .released_for_takeoff? (plane) : returns whether the airport is expecting the plane to take off
  • .weather= : Allows the user to set the weather
  • .planes : Allows the user to see which planes are in the airport
  • .capacity : Allows the user to see the capacity

Plane

Main methods are:

  • .land (airport) : Orders the plane to land at an airport
  • .take_off : Orders the plane to get into the sky

Other public methods:

  • .location : Allows the user to see the location of the plane

Weather

Method:

  • .conditions : Returns randomized weather. Sunny mostly, Stormy 1/10th of the time.

Example Usage:

run feature_test_examples.rb (note this may raise errors when the weather decides to be stormy)

airport_challenge's People

Contributors

anitacanita avatar bebbs avatar dbugsy avatar le5tes avatar leoallen85 avatar michaellennox avatar mihailiviucojocar avatar neoeno avatar nikeshashar avatar silvabox avatar sjmog avatar spike01 avatar tansaku 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.