Temperature Equality (operator==)
easyQuestion 60You are comparing temperatures for a thermostat.
Create a class Temperature that stores degrees Celsius as an int.
Requirements:
1) Constructor Temperature(int c)
2) int getC() const
3) Overload operator== to compare if two Temperature objects have the same Celsius value
Do NOT write a main function.
Expected output
equal not equal
= newline. The output ends with a newline, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
ClassesOperator Overloading
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.