CSC-111 HW2 Calculate Temperature, Dewpoint, or Relative Humidity

Due: Saturday, Sept 22, 11:59pm

Create a program that inputs the 3 sets of 2 inputs needed to calculate Actual Temperature, Dewpoint, and Relative Humidity. For instance, entering Actual Temperature and Dewpoint will calculate the corresponding Relative Humidity. Entering Actual Temperature and Relative Humidity, calculates Dewpoint. Finally, entering Dewpoint and Relative Humidity, allows calculation of Actual Temperature.

Use the Scanner class for your input. To be clear, you will submit just one program that will have a total of 6 input methods and 3 calculations and outputs.

Use this website: for the necessary formulas. That page also has a calculator, you can use to check your own calculations.

All the temperatures in the equations are based in Celcius.  We live in a Fahrenheit world.  Please input and output temperatures in Fahrenheit.

Your outputs should be neatly formatted and annotated. Output 3 decimal digits.

Note: Just use the topics discussed in chapter 2, or what was discussed in class.  No methods, loops, if statements should be coded.


References in the formulas to

  • exp(expr) is Math.exp(expr) in Java
  • ln(expr) is Math.log(expr) in Java