import java.awt.*;
import java.util.Scanner;

abstract class Figure {
    protected int x;
    protected int y;
    public static int count;
    public static int Count(){
        return count;

    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    abstract void draw();

    abstract void move();
}

 class Line extends Figure {
     int x2;
     int y2;


     Line(int k1, int l1, int k2, int l2) {
         count++;
         super.x = k1;
         super.y = l1;
         x2 = k2;
         y2 = l2;


     }
     void draw() {
         System.out.println("Линия");
         System.out.println("Координаты:");
         System.out.println("(x1;y1):" + "(" + x + ";" + y + ")");
         System.out.println("(x2;y2):" + "(" + x2 + ";" + y2 + ")");
     }

     void move() {
         Scanner scanner = new Scanner(System.in);
         System.out.println("Сдвинуть фигуру");
         System.out.print("По оси X: ");
         int t = scanner.nextInt();
         System.out.print("По оси Y: ");
         int t2 = scanner.nextInt();
         x = x + t;
         x2 = x2 + t;
         y = y + t2;
         y2 = y2 + t2;
         System.out.println("Новые координаты фигуры: ");
         System.out.println("(x1;y1):" + "(" + x + ";" + y + ")");
         System.out.println("(x2;y2):" + "(" + x2 + ";" + y2 + ")");
     }
 }
 class Rectangle extends Figure {

     int x2;
     int y2;
     int x3;
     int y3;
     int x4;
     int y4;

    Rectangle(int k1, int l1, int l2, int k3) {
         count++;
         super.x = k1;
         super.y = l1;
         x2 = x;
         y2 = l2;
         x3 = k3;
         y3 = y;
         x4 = x3;
         y4 = y2;
     }

     void draw() {

         System.out.println("Прямоугольник");
         System.out.println("Координаты:");
         System.out.println("(x1;y1):" + "(" + x + ";" + y + ")");
         System.out.println("(x2;y2):" + "(" + x2 + ";" + y2 + ")");
         System.out.println("(x3;y3):" + "(" + x3 + ";" + y3 + ")");
         System.out.println("(x4;y4):" + "(" + x4 + ";" + y4 + ")");
     }

     void move() {
         Scanner scanner = new Scanner(System.in);
         System.out.println("Сдвинуть фигуру");
         System.out.print("По оси X: ");
         int t = scanner.nextInt();
         System.out.print("По оси Y: ");
         int t2 = scanner.nextInt();
         x = x + t;
         x2 = x2 + t;
         x3 = x3 + t;
         x4 = x4 + t;
         y = y + t2;
         y2 = y2 + t2;
         y3 = y3 + t2;
         y4 = y4 + t2;
         System.out.println("Новые координаты фигуры: ");
         System.out.println("(x1;y1):" + "(" + x + ";" + y + ")");
         System.out.println("(x2;y2):" + "(" + x2 + ";" + y2 + ")");
         System.out.println("(x3;y3):" + "(" + x3 + ";" + y3 + ")");
         System.out.println("(x4;y4):" + "(" + x4 + ";" + y4 + ")");
     }
 }
 class Circle extends Figure {
     int r;

     Circle(int k1, int l1, int u) {
         count++;
         super.x = k1;
         super.y = l1;
         r = u;
     }

     void draw() {

         System.out.println("Круг");
         System.out.println("Координаты:");
         System.out.println("Центр (x;y):" + "(" + x + ";" + y + ")");
         System.out.println("Верхняя точка: " + "(" + x + ";" + (y + r) + ")");
         System.out.println("Левая точка: " + "(" + (x - r) + ";" + y + ")");
         System.out.println("Нижняя точка: " + "(" + x + ";" + (y - r) + ")");
         System.out.println("Правая точка: " + "(" + (x + r) + ";" + y + ")");
     }

     void move() {
         Scanner scanner = new Scanner(System.in);
         System.out.println("Сдвинуть фигуру");
         System.out.print("По оси X: ");
         int t = scanner.nextInt();
         System.out.print("По оси Y: ");
         int t2 = scanner.nextInt();
         x = x + t;
         y = y + t2;
         System.out.println("Новые координаты фигуры: ");
         System.out.println("Центр (x;y):" + "(" + x + ";" + y + ")");
         System.out.println("Верхняя точка: " + "(" + x + ";" + (y + r) + ")");
         System.out.println("Левая точка: " + "(" + (x - r) + ";" + y + ")");
         System.out.println("Нижняя точка: " + "(" + x + ";" + (y - r) + ")");
         System.out.println("Правая точка: " + "(" + (x + r) + ";" + y + ")");
     }
 }
 class CompositeFigure extends Figure {
     int[] intAry = new int[10];
     Figure []Array = new Figure[]{
             new Line(1, 1, 2, 2),
             new Rectangle(1, 1, 4, 5),
             new Circle(2, 2, 4),
     };
     CompositeFigure(int i) {
         Figure Composite[] = new Figure[4];
         Composite[0] = new Line(1, 0, 3, 4);
         Composite[1] = new Line(5, 7, 9, 9);
         Composite[2] = new Rectangle(3, 3, 4, 6);
         Composite[3] = new Circle(0, 0, 2);
         }

     void draw() { //Что делать с этими методами?
     }

     void move() {
     }
     }

 class Activity {
     public static void main(String[] args) {
         Line line = new Line(1, 1, 4, 2);
         Circle circle = new Circle(0, 0, 2);
         Rectangle rectangle = new Rectangle(3, 3, 4, 6);

         line.draw();
         line.move();

         rectangle.draw();
         rectangle.move();

         circle.draw();
         circle.move();

         //CompositeFigure.draw(); //Как здесь?

         System.out.print(Count()); //Как здесь?

     }
 }