CJCoding With Joseph

Guitar Overrides Play

Instrument has a virtual method Play that returns "silence". Override Play in Guitar so it returns "Strum" instead. Do NOT write a Main method.

A Guitar prints:

Strum

A plain Instrument still prints:

silence

Expected Output:

Strum
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.