This page implements Java in 2 ways - 1. It passes the calculations from the JavaScript into the applet (output) window, and 2. It uses that applet (output) window as a scratchpad.
Choose the destination from the dropdown menu that you would like to calculate travel to (all calculations are based on the Detroit city starting point).
Input the average miles per gallon that you get in the transportation vehicle (a valid mpg entry must be between 1 and 200 mpg).
Input the current gas price per gallon in US dollars (a valid price entry must be between .01 and 10.00 - and should not include the dollar sign i.e. 1.23).
Input the average speed in miles per hour that you plan to travel on your trip (a valid speed entry must be between 1 and 125 mph).
Click the Calculate button.
Results will be displayed in the output applet window by showing you the miles to your destination, travel time, and gas cost. You can select an output color for the text by clicking a color selection radio button in the applet window and then clicking the "calculate" button.
The output window can also be used as a scratch pad to draw quick notes or doodle on - just click anywhere inside the window. You can select a color to draw in by clicking a color in the output window.
Click the "Clear Form" button to clear the form.
Click the "Clear output Window" button to clear the applet output or scratchpad drawing.
OUTPUT/SCRATCHPAD
Created By: Robert M. Fracassa - CIS 525 - Fall 2001
*Note: This has been tested and works best with Internet Explorer 5.5 and above and Netscape Navigator 6.0