Question: Write a program that - defines the class Point which has the following: default constructor (has no parameters) constructor that has 2 parameters (x coordinate,

Write a program that - defines the class Point which has the following: default constructor (has no parameters) constructor that has 2 parameters (x coordinate, y coordinate) data members x coordinate, y coordinate - member functions - one to set the value of each of the data members one to get the value of each of the data members one that returns the distance from the origin (0,0) Function definitions outside of the class!!!) in main0 instantiate one Point object and initialize at the time of definition by providing initial coordinates -define a pointer that points to the object defined above use the pointer as an argument passed to a global function that will update the coordinates of the point to (7,4) - back in main, display the distance from the origin
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
