class Tests{
public static void main(String[] args) {
//狗狗并没有继承Pet的name和age属性,而是通过父类public的构造方法间接访问
Dog dog = new Dog("旺财",3,"哈士奇");
Cat cat = new Cat("公");
dog.showInfo();
System.out.println("*********");
dog.showDog();
System.out.println("*********");
cat.showInfo();
}
}