Hello my friends
I have a question that is very important for me
i should write this :
1. Write a program that implements the MyPoint point class as follows.
* Two private variables (x,y)
* Default constructor function
* The constructor function with the value that takes the coordinates from the input
* Accessibility and value functions for both variables.
* The Print function prints the point specifications
* DistanceToOrigin function that prints the point distance from the coordinate center
* DistanceToPoint function that receives the MyPoint object from the input and calculate and print distance of current object to that point.
This is not likely to be done in time, but you can still learn from it.
I would start with:
1. Write a program that implements the MyPoint point class as follows.
a Two private variables (x,y)
b Default constructor function
c The constructor function with the value that takes the coordinates from the input
d Accessibility and value functions for both variables. // <--- I take this to be the "get" and "set" functions.
Write the code. Compile often and fix the errors. then give it a test run to see if it works.
Post your code to show your progress. Preferably in a new post.