package rebelsky.newvec; import java.io.PrintWriter; /** * Lots of fun tests. * * @author CSC152 2004S * @version 1.0 of September 2004 */ public class Main { public static void main(String[] args) throws Exception { PrintWriter pen = new PrintWriter(System.out, true); GraduateAssistant greg = new GraduateAssistant(pen); Vec2D v1 = new Point(2.0, 3.0); if (v1.equals(v1)) { pen.println(v1 + " equals " + v1); } else { pen.println(v1 + " does not equal " + v1); } if (v1.equals("hello")) { pen.println("Cool, strings and vectors can be the same."); } else { pen.println("Can't compare strings and vectors."); } Vec2D v2 = v1.rotate(Math.PI).rotate(Math.PI); if (v1.equals(v2)) { pen.println("Rotation preseves point."); } else { pen.println("Rotation does not preserve point; v1=" + v1 + "; v2=" + v2 + "."); } // greg.test(new Point(2.0,3.0)); // greg.test(new Polar(4.5,Math.PI/8.0)); // greg.describeR(new Polar(3.2,Math.PI/8.0)); } // main(String[]) } // Main