Week 1: Challenge @ Makers Academy
The weekend challenge at Makers Academy is an exercise meant to test the understanding of the material taught during the week. In this week, we will take what we learnt from Boris Bikes and design a system for trains.
FAAST:
- Coach: Has a capacity of 40 passengers, allows passengers to board, allows passengers to alight, keeps a count of passengers onboard, and knows when it's full.
- Passenger: Has a top-up balance in order to travel on trains; initial balance is zero. Can top-up balance in order to travel. Can board a coach and alight from a coach.
- Station: Lets a passenger touch in, lets the passenger touch out, regulates train arrival and departure, knows how many trains are at the station.
- Train: Arrives at station, departs from station, finite number of coaches, knows when its coaches are full.
- CRC (Class-Responsibility-Collaboration) Card
- Ruby syntax
- Testing using Rspec
- Mocking using doubles in Rspec
- Refactoring Code
- DRY Principle
- Ruby 2.1.2
- Rspec
- IRB
- Clone the repository
- Change into the directory
- Run IRB
- Load runner.rb file
- Take a train somewhere!