Project #49324 - Data Structures in Java Programming

This homework only has a programming section.

Programming

For the programming portion of the assignment please submit only your .java files. Your code should be well commented. In addition please include a detailed README.txt file that explains how to compile and run your code.

  1. This exercise will consider the "traveling salesperson problem" (TSP). Write a Java program to generate N (x,y) random number pairs in the range 0-1. Each of these pairs will be coordinates on an XY grid representing city locations. Your program should do the following:

    • Display the grid with coordinates (you will need to scale the coordinates accordingly).
    • Using a button, compute and draw the optimal TSP route for the N cities. Display the optimal tour length as well. Be careful: do not attempt to do this with N greater than 7 or so as you will find your computer running and never finishing.
    • Using another button, compute the best Nearest Neighbor tour. You will need to try each location as the starting city to find the best Nearest Neighbor tour, as it depends on the start city. Draw the tour and display its length also.
    • DO NOT SUBMIT CLASS FILES, only submit the source java files and the README.txt. We will compile the programs for you. Once all the files are in place, make a zip file out of that directory.

Subject Computer
Due By (Pacific Time) 12/09/2014 12:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy