CJCoding With Joseph
15free / daySign inCreate account

You are adjusting an allowed temperature range by a delta.

Create a class TemperatureRange that stores TWO ints: lowC and highC.

Requirements: 1) Constructor TemperatureRange(int lowC, int highC) 2) operator+(int delta) returns a NEW TemperatureRange where BOTH lowC and highC are increased by delta 3) operator<< prints like: lowC-highC C Example: 20-25C

Do NOT write a main function.

Expected output

23-28C
-5-0C

= newline. The output ends with a newline, so print one after the last line.

Hints4 available
Topics
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.