โ Back to Interfaces
Question 624
Implement an Interface Method That Changes State
Implement an Interface Method That Changes State
TheICounterinterface requires aCountproperty and anIncrementmethod. TheCounterclass already has theCountproperty. CompleteIncrementso it raisesCountby one. The tester increments a few times and printsCount. Do NOT write aMainmethod. After three calls toIncrement, the program prints: 3
Expected Output:
3
Topics:
Interfaces
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.