Point dot java

Point dot java - public Point(double b double c x= b y= c =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/** An instance is a point (x, y) in the plane */ public class Point { /** The x and y coordinates of a point */ private double x; private double y; /** Constructor: a point (b, c) */
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public Point(double b, double c) { x= b; y= c; } /** = a representation (x, y) of this point */ public String toString() { return "(" + x + ", " + y + ")"; }...
View Full Document

This note was uploaded on 07/07/2008 for the course CS 101 taught by Professor Gries during the Spring '08 term at Cornell.

Ask a homework question - tutors are online