// Allison Obourn
// CS& 141, Winter 2021
// Lecture 15

// 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);
      Point p2 = new Point(56, 100);

      System.out.println(p1); 
      p1.translate(3, 5);
      System.out.println(p1.getX() + " " + p1.getY());
      System.out.println(p2);
      
      DrawingPanel panel = new DrawingPanel(200, 200);
      Graphics g = panel.getGraphics();
      
      p1.draw(g);
      p2.draw(g);
      System.out.println(p1);
   }
}