a small class problem

I have a small problem with writing a class.
I should do my H.W. which needs to creat a point class, the user have to insert
it's 2 coordinates(x,y) for 2 points, the problem is to make a 3rd object which
contain the sum of the previous two objects ( p1.x + p2.x , p1.y +p2.y ).
how can i do this, if i declare the 3rd object it will goes to constructor to add a new coordinates for a new point .
please help.
thank you zhuge
Topic archived. No new replies allowed.