CJCoding With Joseph
15per day

Greeter Class

Create a class Greeter with a method Greet(string name) that RETURNS the string "Hello, {name}!" (do not print inside the method). Do NOT write a Main method โ€” the tester constructs your class and prints the result.

For Greet("Sam") the program prints: Hello, Sam!

Expected Output:

Hello, Sam!
Topics:
Classes
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.