Question: Create a python class of cartesian coordinate Point and write a constructor, a translatePoint member function ( which translate the point object x coordinate to

Create a python class of cartesian coordinate Point and write a constructor, a translatePoint member function (which translate the point object x coordinate to deltaX and y coordinate to deltaY), a distanceOrigin member function(which finds the distance of the point object from origin (0,0)), an overloaded print function (which prints the x coordinate and y coordinate of the point), an overloaded add function which outputs a new point (formed by adding the coordinates of two point objects). Implement each member function in the code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!