CJCoding With Joseph

Void Method and State in an Interface

The interface ICounter declares a Value property and a void Increment() method. Complete Increment so it adds 1 to the private field _value. Do NOT write a Main method.

After the tester calls Increment() three times, 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.