Git Product home page Git Product logo

airport_challenge's Introduction

Airport Challenge

The program is divided into 3 classes: Airport, Plane and WeatherReport.

Airport object:

  • can be assigned custom capacity when initialized
  • is initialized in an empty state
  • calls ground control to return current number of planes
  • receives requests from planes: to land and to take off
  • has private methods that act as tower: they ask another private method for current weather report before issuing permission or denying it to the methods that receive requests from planes

Plane object:

  • is assigned status of "in air" by default (as Airport objects are initialised in an empty state)
  • can be assigned status "grounded" with the .update method

WeatherReport object:

  • randomly selects weather forecast from an array of forecasts, 7 of which are good for flight and 3 of which are "stormy"
        ______
        _\____\___
=  = ==(____MA____)
          \_____\___________________,-~~~~~~~`-.._
          /     o o o o o o o o o o o o o o o o  |\_
          `~-.__       __..----..__                  )
                `---~~\___________/------------`````
                =  ===(_________)

Task

User stories covered:

As an air traffic controller
So I can get passengers to a destination
I want to instruct a plane to land at an airport

As an air traffic controller
So I can get passengers on the way to their destination
I want to instruct a plane to take off from an airport and confirm that it is no longer in the airport

As an air traffic controller
To ensure safety
I want to prevent takeoff when weather is stormy

As an air traffic controller
To ensure safety
I want to prevent landing when weather is stormy

As an air traffic controller
To ensure safety
I want to prevent landing when the airport is full

As the system designer
So that the software can be used for many different airports
I would like a default airport capacity that can be overridden as appropriate

Still to do:

  • tests are not DRY and should be refactored
  • suspected incorrect test syntax in mocking methods
  • deprecated methods used in some test mocks
  • overcomplicated logic of planes requesting permissions to land/takeoff and airports issuing/denying permissions: given more time, I would refactor methods to meet the SRP rule
  • planes and airports should have ids - given more time I would use the object id to identify that correct planes end up in correct airports
  • feature test that creates muliple airports that handle multiple planes

airport_challenge's People

Contributors

tansaku avatar silvabox avatar neoeno avatar aniasobo avatar dbugsy avatar dearshrewdwit avatar leoallen85 avatar spike01 avatar anitacanita avatar bebbs avatar michaellennox avatar mihailiviucojocar avatar nikeshashar avatar sjmog avatar anthony-hull avatar

Watchers

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