Question: P7.12 in C++ please C++ requirements Hey! C program is OK Engineering P7.12 Write a program that simulates the control software for a people mover

P7.12 in C++

P7.12 in C++ please C++ requirements Hey! C program is OK Engineering

P7.12 Write a program that simulates the control software for a "people

mover" system, a set of driverless trains that move in two concentric

circular tracks. A set of switches allows trains to switch tracks. In

please C++ requirements

Hey! C program is OK

Engineering P7.12 Write a program that simulates the control software for a "people mover" system, a set of driverless trains that move in two concentric circular tracks. A set of switches allows trains to switch tracks. In your program, the outer and inner tracks should each be divided into ten I segments. Each track segment can contain a train that moves either clockwise or counterclockwise. A train moves to an adjacent segment in its track or, if that segment is occupied, to the adjacent segment in the other track. Define a Segment structure. Each segment has a pointer to the next and previous segments in its track, a pointer to the next and previous segments in the other track, and a train Indicator that is 0 (empty), +1 (train moving clockwise), or -1 (traln moving counterclockwise). Populate the system with four trains at random segments, two in each direction. Display the tracks and trains in each step, like this: ------- XXX TEXTXT X X X The two rectangles indicate the tracks. Each switch that allows a train to switch between the outer and inner track is indicated by an x. Each train is drawn as a > or or

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!