Solid, Liquid, Gas

Write a program SolidLiquidGas.java that reads a String in such as “58F” or “107C”, where the numbers represent the temperature value and the letter C or F represents Celsius or Fahrenheit. Print whether water is liquid, solid, or gas at the given temperature (at sea level).

Variation

As part of this assignment, write the String method getState(String temp) which returns the String solid, liquid, or gas depending on the temperature. Use this method in your main() program.