MetroSim

Jul 2023

GOAL: create a train simulator with given requirements

SKILLS: C++ programming, object oriented programming, vectors and linked-list queues

This program simulates a metro system where passengers can board and get off at different stations. 

The user provides a stations file, an output file, and an optional commands file if they want an automated simulation. If no commands file is provided, they will manually input the commands when prompted by the program. 

The user has 3 command options:

When a train gets to a station, passengers on the train with that station as their destination get off, and passengers waiting at that station get on. The passengers are in a specific order.


The program uses OOP and is implemented with a vector to store the names of the stations, vectors to contain passengerQueue objects for the passengers at the stations and on the train, and the passengerQueues themselves are linked list based queues.

demo of use:

output file contents: