Transport for London, the body responsible for delivery of a new bike system, come to you with a plan: a network of docking stations and bikes that anyone can use. They want you to build a program that will emulate all the docking stations, bikes, and infrastructure (repair staff, and so on) required to make their dream a reality.
Simple ruby program with rspec testing framework. No gems, no back-end.
Below are some domain models representing
Person, bike, docking stations
Use (bike), release (bike), check (bike)
Object | Messages |
---|---|
Person | |
Bike | working? |
DockingStation | release_bike |
Person -> check_bike -> Bike Docking_Station -> release_bike -> Bike