"This assignment is to be done in C++. Your result should have at least three classes (SubwaySystem, Station, and Track), with implementation and interfaces in
separate files.
No adjacency matrices here"

I'd do something like this. The SubwaySystem has all subway stations and tracks. A station is associated with several tracks. All subway stations are associated with at least one track.

Now in your SubwaySystem, you could add a method which accepts two stations and returns the shortest route (as either a track, or collection of tracks, or list of stations that you will transfer at). To find this, you'd find the tracks on the selected stations, start branching out on those tracks and checking the other tracks. You'd need to count a metric to determine shortest route while you send out your ants looking for the destination. That metric might be time between stations, distance between stations or (easier) number of stations or number of transfers.