CS 1500: Project 3 -- Climber tools

Due Friday, Nov. 16, 5:00 pm

 

For this project, you will develop a Java program that will help a traveller going to Europe, to "climb the Alps" (thanks to Dr. Thomas for the idea for this project . . .).

You will make a tool (a Java application) that will calculate various things:

You can look up the formulas for converting fahrenheit to centigrade (and vice versa).

The "official" wind-chill formula looks like this:

	/* The wind chill temperature is calculated using
	 *  the following formula:
	 * Windchill (ºF) = 35.74 + 0.6215T - 35.75(V^0.16) + 0.4275T(V^0.16)
	 *   Where: T = Air Temperature (F)
	 *   V = Wind Speed (mph)
	 *   ^ = raised to a power (exponential)
	 *      (note: Java doesn't use this . . . use Math.pow())
	 * Windchill Temperature is only defined for temperatures
	 * at or below 50 degrees F and wind speeds above 3 mph.
	 * Bright sunshine may increase the wind chill temperature
	 * by 10 to 18 degrees F.
	 * 
	 * http://www.nws.noaa.gov/os/windchill/windchillglossary.shtml
	 * 
	 */
Your program should check the wind speed entered by the user, and if it is below 3 mph, adjust and use 3 mph. If the temperature entered is above 50 degrees F, you can either go ahead and use the temperature entered, or adjust it to 50 degrees for the calculation. Your program should have a loop, prompting the user for a choice of which calculation to do, and should use java methods to do the calculations. See the sample program interaction below . . .

Submission: We will be using the CS Homework Submission system

( https://hopper.csustan.edu/cshomework/ ).

You will submit your ".java" file, as usual . . .

Input data: Your program will read commands (and data) from the keyboard (see example below).

Output: Your program will perform the appropriate calculations (see below).

Scoring: The maximum possible score for the project will be 80 points. There will be up to 40 points for correct operation of your program, and up to 40 points for style, comments, etc.

Late programs will have their maximum possible score reduced to 0.9 times previous for each calendar day late (i.e., maximum possible score = 80 * (0.9^n) for n days late . . .).


Example:
		Please enter a command (c, f, d, e, w, q): c

		Convert Centigrade to farenheit

		Enter centigrade temperature: 37
		37 centigrade = 99 farenheit

		Please enter a command (c, f, d, e, w, q): f

		Convert farenheit to centigrade

		Enter farenheit temperature: 212
		212 farenheit = 100 centigrade

		Please enter a command (c, f, d, e, w, q): d

		Convert dollars to euros

		Enter dollars: 10
		10.00 dollars = 7.70 euros

		Please enter a command (c, f, d, e, w, q): e

		Convert euros to dollars

		Enter euros: 10
		10.00 euros = 13.00 dollars

		Please enter a command (c, f, d, e, w, q): w

		Calculate windchill

		Enter temperature (farenheit): 32

		 and windspeed (mph): 20

		  Windchill for 32 degrees farenheit and windspeed 20 mph

		    is 20 degrees

		Please enter a command (c, f, d, e, w, q): w

		Calculate windchill

		Enter temperature (farenheit): -30

		 and windspeed (mph): 50

		  Windchill for -30 degrees farenheit and windspeed 50 mph

		    is -74 degrees


		Danger of freezing (wind chill below - 61 degrees):  Put your gloves on!!!


		Please enter a command (c, f, d, e, w, q): w

		Calculate windchill

		Enter temperature (farenheit): 20

		 and windspeed (mph): -10

		  Windchill for 20 degrees farenheit and windspeed 3 mph

		    is 21 degrees
		
		Please enter a command (c, f, d, e, w, q): m
			Command not recognized
		Please enter a command (c, f, d, e, w, q): q

		Thanks -- have a nice day!