Question: C++ Please add a constructor and deconstructor to the class :) Practice 3: Point Write a definition of a class named Point that might be
Practice 3: Point Write a definition of a class named Point that might be used to store and manipulate the location of a point in the plane The member functions should be implementec a member function, set, to set the private data after creation - a member function to move the point a vertical distance and a horizontal distance specified by the first and second arguments a member function that rotates the point 90 degrees counterclockwise about the origin - two member functions to retrieve the current coordinates of the point. Test with several points exercise member functions Practice 3: Point Class class Point ( public: void set(int xval, int yval); void move(int xval, int yval); void rotate double getX); double getY); private: int x int y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
