I need an implementation of this puzzle in a Java Applet. This program will provide a graphical representation of the puzzle, which can be manipulated by a user to arrive at a solution. The code must be fully tested and must be able to be demonstrated on any reasonable platform such as a PC running Linux or Windows NT/ XP, using a popular browser such as Netscape, Internet Explorer or Opera. The Program must also be able to demonstrate the solution to the puzzle and recognise that the user has solved the problem. The source code must be fully commented so I can understand it. Here is the puzzle. Exploring the Desert Five travellers, each possessing a motorcar, meet on the eastern edge of a desert. They wish to explore the interior, always heading due west. Each car can travel exactly 40 miles on 1 gallon of petrol; each starts with one gallon of fuel in its tank and carried five additional cans of petrol each also holding one gallon. Unopened cans can be transferred from one car to another, but no car can carry more than 5 gallons of fuel in addition to its own 1-gallon tank. How can the travellers best share their fuel so that one of them can penetrate as far as possible into the desert? Naturally, it is essential that all the travellers return safely. You should be able to produce a graphical representation of the 5 cars and the petrol that each of them can carry. Here is the solution The 5 men, A, B, C, D & E, all go 40 miles together on the 1 gallon in their engine tanks, when A transfers 1 gallon to each of the other 4 cars and has 1 gallon left to return home. The 4 go another 40 miles when B transfers 1 gallon to each of the other 3 and has 2 gallons left to return home. This process is repeated until finally the last man, E, travels another 40 miles and has 5 gallons to take him home, having travelled 200 miles.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. 4) Source code must be fully commented.
The code must be fully tested and must be able to be demonstrated on any reasonable platform such as a PC running Linux or Windows NT/ XP, using a popular browser such as Netscape, Internet Explorer or Opera.