Question: Create a class Point having X and Y Axis with default constructor to initialize the value of X and Y to 0. A parametric

  • Create a class Point having X and Y Axis with default constructor


Create a class Point having X and Y Axis with default constructor to initialize the value of X and Y to 0. A parametric constructor which accept x and y as arguments, getter and setter functions for X and Y. An Add member function to sum up the values of X and Y point and return it, A a print member method to print the value of X and Y and their sum.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include using namespace std class Point int xy public int main default construc... View full answer

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 Computer Engineering Questions!