HELP!

Vannie Vo
Greenhorn
Posts: 5
"Suppose we have this Point Class"
public class Point {
int X;
int Y;
Point(int w, int h){
X = w;
Y = h;
//finish this method that computes the distance
//between this Point and an x and y coordinat.
public double distance(int w, int h) {
//Your code here. Any suggestions anyone?
}
----------------------------------------------
Another problem related to the problem above:
"Create a method called distance that looks like this. This is part of the Point class"
public double distance(Point p){
}
Thank you....Vannie

David O'Meara
Rancher
Posts: 13459
Vannie,
Firstly, it is good practice to be more descriptive in your subject titles. This helps us to help you, so it's in your own favour.
Secondly, this looks remarkably like homework. We don't like doing people's homework for them. Did you have a more specific question you'd like answered rather than "Please do my homework"?
eg Title: Distance in 2 dimensions
Given two points, (x1, y1) and (x2, y2), how do I find the distance between them?
thanks,
Dave

Mike Curwen
Ranch Hand
Posts: 3695
and thirdly, don't cross-post.

This is also in the "Java In General - Beginner's" forum. Where someone reminded you of High School.