Question: IN JAVA Implement a method getState to determine whether water is liquid, solid (ice) or gaseous at a given altitude. The method should take one
IN JAVA
Implement a method getState to determine whether water is liquid, solid (ice) or gaseous at a given altitude.
The method should take one argument of type double (temperature in degrees Fahrenheit) and one argument of type int (altitude in ft) and return a String describing the state of water ("solid", "liquid" or "gaseous").
Recall that at sea level, the freezing point of water is at 32 degrees Fahrenheit, and the boiling point at sea level is at 212 degrees Fahrenheit. Note that the boiling point of water drops by two degrees Fahrenheit for every 1000 ft of altitude (the freezing point remains the same).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
