MetroSim is a program that can simulate passengers coming on and off as they ride a train line between stations. First project in my data structures course at Tufts University. This is an interactive simulation in which users can add passengers and make them get on at a stop, and then ride the train until a desired stop.
Since this was a data structures course, each project was meant to study a specific data structure, in this case, queues. The queue was used to depict passengers waiting for the train in the simulation.
While developing this project, I was challenged with testing large functions. I realised the struggle of making small tests for large functions, and making checkpoints along the development process that tested every “edge case” I could think of. I was also unsure how to implement the intended behavior of the program using object-oriented programming. This project showed me that not every part of the program needs to be a class, as that would complicate the program (e.g. Train and Station class were implemented at one point, but proved to be redundant).
I cannot share the code of this project due to course agreements, but would love to show one if they asked :).
Leave a Reply