Question: Define a new class named Temperature. The class has two accessorstoFahrenheit and toCelsiusthat return the temperature in the specified unit and two mutatorssetFahrenheit and setCelsiusthat
Define a new class named Temperature. The class has two accessorstoFahrenheit and toCelsiusthat return the temperature in the specified unit and two mutatorssetFahrenheit and setCelsiusthat assign the temperature in the specified unit. Maintain the temperature internally in degrees Fahrenheit. Using this class, write a program that inputs temperature in degrees Fahrenheit and outputs the temperature in equivalent degrees Celsius
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
