定义一个Animal类,包含Type属性,toString()方法和虚方法sound()方法,并派生出Dog类、Cat类,派生类拥有另外一个属性Name。并在测试类中测试定义的类。 方法 拥有 发布时间:2024-05-14 08:53:45