CJCoding With Joseph
15free / daySign inCreate account

Move The Point

A Point stores x and y. Write the body of move so it shifts the point in place by adding dx to x and dy to y; nothing is returned. Do NOT write a main block or any top-level test code; the tests construct the class. Input: four lines, the starting x and y and then dx and dy, which the tests read as floats; after calling move they print the new x and the new y on separate lines.

Expected Output:

4.0
6.0

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Classes
📥 Auto-Input:
1\n2\n3\n4\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.