package rebelsky.pointless; /** * Look! It's a point. * * @author Rolf "What's Dag, ish?" * @author Sam "Don't call me 'ish'" * @author Everyone "I'm sick of these stupid interactions between Rolf and Sam" Else * @author !Brad * @version early */ public class Point { // Fields double x; double y; // Constructor /* public Point() { this.x = 0.0; this.y = 0.0; } */ public Point(double _x, double _y) { this.x = _x; this.y = _y; } // Point(double,double) // Methods /** * Determine the x coordinate of this point. We can * view the x coordinate as the horizontal distance between * a vertical line through the origin and a vertical line * through the point. */ public double getX() { return this.x; } /** * Blah. Blah. Blah blah blah. */ public double getY() { return this.y; } /** * Ask stone. */ public double getDistanceFromOrigin() { return Math.sqrt(this.x*this.x + this.y*this.y); } } // class Point