โ Back to Classes
Question 431
Full Name Property
Full Name Property
Create a classContactwhose constructor stores a first and last name in private fields. Add a read-only property namedFullNamethat returns the two names joined by a space. Do not write aMainmethod. Fornew Contact("Ada", "Lovelace").FullNamethe program prints: Ada Lovelace
Expected Output:
Ada Lovelace
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.