Classes, objects, points

closed account (EwqDy60M)
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.

Pls help me, i have no time.
Thank you.

i have no time

Should've started earlier then.
Hello rubingood,

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.


Andy
closed account (EwqDy60M)
thank u @Handy_Andy
i'll do
Topic archived. No new replies allowed.