?
By using the setup provided by the GWin library and the example project provided for you, you can create graphics window and several processes which represent 5 trains going through a weak bridge. For the purposes of the coursework we will assume that a train will be represented by a line and you will be able to run 5 trains from left to right and back on their own. Next assume that the middle of the graphics window is a weak bridge which will withstand on it two trains only at any one time and each train must synchronize its entry onto the bridge using a semaphore - so that it would not collapse. Two trains max allowed on to the bridge at any one time and they can move in any direction. There is also a ship going from top to bottom and back on the screen. All graphics is provided for you, but the drawing performed by the program is not synchronised on the screen.