package com.codegym.task.task14.task1412;

/*
Implement the printMainInfo method

*/

public class Solution {
    public static void main(String[] args) {
        //Object obj = new Movable();
       // Movable movable = (Movable) obj;
       // Rectangle drawable = new Rectangle();
       Rectangle drawable =new Rectangle();
       Circle movable=new Circle();
        printMainInfo(drawable);
        printMainInfo(movable);
    }

    public static void printMainInfo(Object object) {
        if ( object instanceof Rectangle ){
            object.draw();
        }
        else if ( object instanceof Circle){
            object.move();
        }
        //write your code here
    }

    static interface Movable {

        void move();
    }

    static class Circle implements Movable {

        public void draw() {
            System.out.println("Can be drawn");
        }

        public void move() {
            System.out.println("Can be moved");
        }

    }

    static interface Drawable {
        void draw();
    }

    static class Rectangle implements Drawable {
        public void draw() {
            System.out.println("Can be drawn");
        }

        public void move() {
            System.out.println("Can be moved");
        }
    }
}