To test your RideShare program, set up the following conditions:
Run your program through 6 iterations of dropoff-pickup-move.
Station 0 Station 1 Station 2 Station 3 Station 4
------------------ ------------------ ------------------ ------------------ -----------------
Car(0, 4) Car(2, 4) Car(4, 1)
Passenger(0,2) Passenger(1, 2) Passenger(3, 0)
Passenger(1, 3)
Passenger(1, 4)
This placement of cars and passengers is designed to test most aspects of your program. By the time the program has completed running, you should find the following state.
Station 0 Station 1 Station 2 Station 3 Station 4
------------------ ------------------ ------------------ ------------------ -----------------
Car(1, 1) Car(4, 4)
Passenger(1, 4) Car(4, 4)
Passenger(3, 0)
If you have implemented passenger-miles
, there should be a total of 7, for a total of 9 miles driven.