Win a copy of Head First Go this week in the Go forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

How to make a train run through stations and platforms?  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!