• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to make a train run through stations and platforms?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to provide a simulation of the train passing through stations and tracks o 100 and 1000 m respectively through threads figure is like shown below

|----Glasgow-12---||-----track-----||----Sterling----||-----track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-12----track-----||----Sterling----||-----track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||--12--Sterling----||-----track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||--12---track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||-----track-----||--12--Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||-----track-----||----Perth----||----12-track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||-----track-----||----Perth----||-----track-----||-12--Iverness----|

Now I am able to create a thread which can run this template but i am confused as to how to make a train move through this thread.....any help would be greatly appreciated.....
Provided below are the trains, station and tracks class:
1. Train


2.Track


3.Station




4.Route


5.Display



6.Main

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic