CJCoding With Joseph

Computed Full Name Property

Create a class Contact whose constructor stores a private first name and last name. Add a read-only property FullName that returns the first name, a single space, then the last name. Do not write a Main method.

For new Contact("Ada", "Lovelace") the program prints:
Ada Lovelace

Expected Output:

Ada Lovelace
Topics:
Encapsulation
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.