// Allison Obourn
// CS& 141, Winter 2021
// Lecture 14

// Client that uses our custom Point class.
// Point.java must be in the same folder for this code to work.
// Creates two points and prints them out, moves one, prints it again
// and then draws both on a DrawingPanel.

import java.awt.*;

public class PointClient {
   public static void main(String[] args) {
      Point p1 = new Point(3, 23);
      //p1.x = 3;
      //p1.y = 23;
      Point p2 = new Point();
      p2.x = 56; 
      p2.y = 100;
      System.out.println(p1.x + " " + p1.y);
      p1.translate(3, 5);
      System.out.println(p1.x + " " + p1.y);
      System.out.println(p2.x + " " + p2.y);
      
      DrawingPanel panel = new DrawingPanel(200, 200);
      Graphics g = panel.getGraphics();
      
      p1.draw(g);
      p2.draw(g);
      System.out.println(p1);
   }
}