Route planning system in java
Posted on 2006-04-14
I need to write a short java programme that could form the core of a route planning system. Users will enter names of towns and the programme will calculate distances and likely times.
The programme should:
1 Calculate speed between towns
2 Calculate time taken to travel btwn them
3 Use Kilometers
4 Should enable users to enter an itinerary showing distance travelled and time at which each town is reached.
5 The itinerary should include the arrival and departure time at each stop.
6 The programme will recognise journeys for which the total travelling time(excluding stops) exceeds a statutory maximum.
7 The programme will provide some means by which the user can select a particular town when there's more than one.
THIS PROGRAMME CAN BE BASIC AND IN DOS FORM.
i've got a town.txt file which has all town information (3310line).
It consists of a list of place names, each line (or record) consists of a name (all upper case letters), a two letter county code, the latitude and longitude of the place expressed in seconds with east latitudes being positive and the grid coordinates (east and north) expressed in kilometres. Each item of a record is separated by a colon.
This means that Brisbane is in Bromley (BR), has a latitude of 191520 seconds north (53° 12’) and a longitude of 10440 seconds west (2° 54’), a grid east coordinate of 339 km and a grid north coordinate of 367 km.
The distance between place 1 and place 2 (in kilometres) can be calculated using the formula
Distance =(Math.pow((grid east 1 – grid east 2),2) + Math.pow((grid north 1 – grid north 2),2)) ;
How do i write a prgramme that accesses the information in the file and manipulate the information in the file to enable users to interact with the programme.
town.txt has got all the towns in the above format.
Please contact me if you need to ask any questions, re- my question
thanking you in advance
<changed by CS request by GranMod>