CJCoding With Joseph

Thermostat Inherits Power

Appliance has a public field Power set to 5. Make Thermostat inherit from Appliance so it has that field too. The tester prints Power. Do NOT write a Main method.

The program prints:

5

Expected Output:

5
Topics:
Inheritance
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.