subject

All words in bold are meant to be classes: Route, Train, Station, Passenger. Write a program to simulate a Train route. A train route consists of an array of Stations, starting and ending with a terminal station. The time that a Train needs to travel between a pair of two consecutive stations on the route is given. Each station has a Queue of Passengers (use the Queue class that you developed in Problem 1) You may assume that every 10 minutes (or any other appropriate interval) a random number of Passengers (different for different station) arrive at each station and join the queue. Trains leave a terminal at regular intervals and stop at all the stations on the route. When a train stops at a station, all passengers for that station are removed from the train and then all the passengers waiting in the queue at the station board the train until either the queue is empty, or the train is full. After a train reaches the last station, it goes back on the route, so the passengers enter the train only if their destination is past their origination station.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, fastpitchhailey1354
Write a loop that prints each country's population in country_pop. sample output for the given program with input 'china: 1365830000,india: 1247220000,united states: 318463000,indonesia: 252164800': united states has 318463000 people. india has 1247220000 people. indonesia has 252164800 people. china has 1365830000 people.
Answers: 2
image
Computers and Technology, 22.06.2019 01:30, gabriieldelacruz16
What “old fashioned” features of checking accounts is p2p replacing
Answers: 3
image
Computers and Technology, 23.06.2019 18:00, teamroper35
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
image
Computers and Technology, 24.06.2019 02:20, isabelsmhl
Peter is thinking of a number which isless than 50. the number has 9 factors. when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
You know the right answer?
All words in bold are meant to be classes: Route, Train, Station, Passenger. Write a program to simu...

Questions in other subjects:

Konu
Mathematics, 19.04.2021 19:50