โ Back to Polymorphism
Question 561
Interface Property
Interface Property
The interfaceIProductdeclares a read-onlyNameproperty. Make theBookclass implementIProductby providing aNameproperty that returnsC# in Depth. Do NOT write aMainmethod. The tester runsIProduct p = new Book(); Console.WriteLine(p.Name);and the program prints: C# in Depth
Expected Output:
C# in Depth
Topics:
Polymorphism
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.