โ Back to Interfaces
Question 608
Use a Method Argument in an Interface
Use a Method Argument in an Interface
The interfaceIWelcomerdeclaresstring Welcome(string name). Complete theWelcomerclass so it returnsWelcome,followed by the name and an exclamation mark. Do NOT write aMainmethod. ForWelcome("Sam")the program prints: Welcome, Sam!
Expected Output:
Welcome, Sam!
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.