Search in sources :

Example 1 with Circle

use of corejava.chapter4.lab4_5.shape.Circle in project CoreJava by alekseiiagnenkov.

the class Lab4 method main.

public static void main(String[] args) {
    Line line = new Line(new Point(0, 0), new Point(3, 6));
    Rectangle rectangle = new Rectangle(new Point(0, 10), 20, 10);
    Circle circle = new Circle(new Point(0, 0), 20);
    System.out.println(line);
    System.out.println(rectangle);
    System.out.println(circle);
    Line lineCopy = line.clone();
    Rectangle rectangleCopy = rectangle.clone();
    Circle circleCopy = circle.clone();
    System.out.println(lineCopy);
    System.out.println(rectangleCopy);
    System.out.println(circleCopy);
}
Also used : Line(corejava.chapter4.lab4_5.shape.Line) Circle(corejava.chapter4.lab4_5.shape.Circle) Rectangle(corejava.chapter4.lab4_5.shape.Rectangle) Point(corejava.chapter4.lab1_2_3.Point)

Example 2 with Circle

use of corejava.chapter4.lab4_5.shape.Circle in project CoreJava by alekseiiagnenkov.

the class Lab9 method main.

public static void main(String[] args) {
    Point point = new Point(0, 0);
    Shape circle = new Circle(new Point(0, 0), 20);
    Queue<Integer> queue = new Queue<>();
    queue.add(1);
    queue.add(2);
    queue.add(3);
    Queue.Iterator iterator = queue.iterator();
    Integer a = 0;
    Character[] strings = { '1', '2', '3' };
    Object[] objects = { strings, 0, a, point, queue, iterator, circle, staticPoint };
    for (Object obj : objects) {
        System.out.println(toString(obj));
    }
}
Also used : Circle(corejava.chapter4.lab4_5.shape.Circle) Shape(corejava.chapter4.lab4_5.shape.Shape) Point(corejava.chapter4.lab1_2_3.Point) Queue(corejava.chapter2.lab16_17.Queue)

Aggregations

Point (corejava.chapter4.lab1_2_3.Point)2 Circle (corejava.chapter4.lab4_5.shape.Circle)2 Queue (corejava.chapter2.lab16_17.Queue)1 Line (corejava.chapter4.lab4_5.shape.Line)1 Rectangle (corejava.chapter4.lab4_5.shape.Rectangle)1 Shape (corejava.chapter4.lab4_5.shape.Shape)1