CJCoding With Joseph

Implement Two Interfaces

A class can implement more than one interface. IWalker declares Walk() and ISwimmer declares Swim(). Make Duck implement BOTH so Walk() returns Duck is walking and Swim() returns Duck is swimming. Do NOT write a Main method.

The program prints:
Duck is walking
Duck is swimming

Expected Output:

Duck is walking
Duck is swimming
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.