Call a Static Method on an Interface
easyQuestion 528Since Java 8 an interface may hold a static method with a body. It belongs to the interface itself, so you call it with the interface name in front, the same way you call Math.max. Complete the static method in Converter, then use it from Thermostat.
Requirements:
1. Converter.toFahrenheit(double celsius) returns the temperature in Fahrenheit: multiply by 9, divide by 5, then add 32.
2. In report(), set fahrenheit by calling the static method through the interface name, passing the field celsius. The line that builds the text is written.
3. Do not copy the formula into Thermostat. Thermostat does not implement Converter and does not need to.
Do NOT write a main method.
Expected output
212.0 32.0 25.0 C is 77.0 F
= newline. The output ends with a newline, so print one after the last line.
Your output
Run your code to see the output here...