Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!