package _06_多态综合练习;

public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.setAge(2);
        dog.setColor("黑颜色");

        Cat cat = new Cat();
        cat.setAge(3);
        cat.setColor("灰颜色");

        Person person = new Person("老王",30);
        Person person1 = new Person("李四",25);

        person.keepPet(dog,"骨头");
        person1.keepPet(cat,"鱼");
    }
}
