______
_\____\___
= = ==(____MA____)
\_____\___________________,-~~~~~~~`-.._
/ o o o o o o o o o o o o o o o o |\_
`~-.__ __..----..__ )
`---~~\___________/------------`````
= ===(_________)
A program for managing airports and planes, modelling for weather conditions:
- Planes can land and take off if it is sunny.
- If it is stormy, planes cannot land or take off.
- Allows the creation of multiple airports and planes.
- Allows planes to land at and take off from airports.
- Allows specific weather limits to be set for take off & landing
- Randomised, probabilistic storms.
- Airports can be checked for number of planes they contain at a given time
- Airports have maximum capacities (default 20), set at initialisation
This program was developed in ruby 2.5.0 & formatted with the assistance of Rubocop.
To set up the environment:
$ gem install bundler
\n
$ bundle install
- This program is designed to be used from a REPL.
- Run IRB from the command line and require the airport, plane and weather files.
- Check out the code examples below for ways in which the program can be used.
Plane travelling between airports:
require './lib/airport' require './lib/plane' require './lib/weather'
- Unit tested with RSpec.
- All unit tests can be run from the project home directory using:
$ rspec
- Feature testing was carried out in IRB.
- Each feature test is contained in an isolated method, all of which are listed in: './spec/feature_spec.rb'
An example running of a feature test:
[~Projects/airport_challenge]
$ irb -r './spec/feature_spec.rb' 2.5.0 :001 > plane.take_off => true 2.5.0 :002 > exit