Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

P 7.12 in C++ and hard find other any, and no longer find many program. please you will slow read. Engineering P 7.12 for C++

P 7.12 in C++ and hard find other any, and no longer find many program. please you will slow read. Engineering P 7.12 for C++ Not Java please.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

C++ requirements please

- 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 cach be divided into ten 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 TexPhoto/iStockphoto. 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 (train moving counterclockwise). Populate the system with four trains at random seg- ments, two in each direction. Display the tracks and trains in each step, like this: x x x x 1 x x 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 or or or or

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions