CJCoding With Joseph

Name Formatter Class

Create a class NameCard whose constructor stores a first and last name, and a Formatted() method that returns the name as "<last>, <first>". Do not write a Main method.

For new NameCard("Alan", "Turing") the program prints:
Turing, Alan

Expected Output:

Turing, Alan
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.