Write a class Temperature with:
- a private field
celsius; - a
staticcounter of how manyTemperatureobjects were created, readable withpublic static int getCount(); - a method
toFahrenheit()returningcelsius * 9 / 5 + 32; - a
staticmethodfahrenheitToCelsius(double f)returning(f - 32) * 5 / 9.
TemperatureApp reads two numbers: a value in Celsius and a value in Fahrenheit. It creates two Temperature objects (with the Celsius value and with the converted Fahrenheit value) and prints:
In Fahrenheit: 77.00
In Celsius: 37.00
Objects created: 2