CJCoding With Joseph

ToString Override for Point

Override the ToString method on the Point class so printing a point shows it as (X, Y). Because Console.WriteLine calls ToString automatically, your override controls how the object appears. Do NOT write a Main method.

For new Point(3, 4) the program prints:
(3, 4)

Expected Output:

(3, 4)
Topics:
Polymorphism
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.