编写抽象类Animal,其中Animal抽象类有2个抽象方法voidcry()和StringgetAnimalName(),分别表示要求动物给出自己的叫声和种类名称。然后,编写Animal类的子类:Dog,Cat类,要求实现抽象类中的抽象方法。main主方法如下:Animalanimal;animal=newDog();System.out.println(animal.getAnimalName());animal.cry();animal=newCat();System.out.println(animal.getAnimalName());animal.cry();
编写抽象类Animal,其中Animal抽象类有2个抽象方法voidcry()和StringgetAnimalName(),分别表示要求动物给出自己的叫声和种类名称。然后,编写Animal类的子类:Dog,Cat类,要求实现抽象类中的抽象方法。main主方法如下:Animalanimal;animal=newDog();System.out.println(animal.getAnimalName());animal.cry();animal=newCat();System.out.println(animal.getAnimalName());animal.cry();
He often makes his sister , and this time he is made by his sister. A: cry…cry B: to cry…to cry C: to cry…cry D: cry…to cry
He often makes his sister , and this time he is made by his sister. A: cry…cry B: to cry…to cry C: to cry…cry D: cry…to cry
Tom often makes his sister _______, but yesterday he was made ______ by his sister. A: cry; to cry B: to cry; cry C: cry; cry D: to cry; to cry
Tom often makes his sister _______, but yesterday he was made ______ by his sister. A: cry; to cry B: to cry; cry C: cry; cry D: to cry; to cry
In the past he often made his sister ____, but now he is often made _____ by his sister. A: to cry, to cry B: cry, cry C: to cry, cry D: cry, to cry
In the past he often made his sister ____, but now he is often made _____ by his sister. A: to cry, to cry B: cry, cry C: to cry, cry D: cry, to cry
Though Tommy often makes her little sister _____, today he was made _____by her little sister. A: cry, to cry B: cry, cry C: to cry, to cry D: to cry, crying
Though Tommy often makes her little sister _____, today he was made _____by her little sister. A: cry, to cry B: cry, cry C: to cry, to cry D: to cry, crying
Though Alex had often madehis little sister _______, today he was made ______ by his little sister. A: cry; to cry B: to cry; cry C: cry; cry
Though Alex had often madehis little sister _______, today he was made ______ by his little sister. A: cry; to cry B: to cry; cry C: cry; cry
应用编程题(共8分) 设计一个动物声音“模拟器”,希望模拟器可以模拟许多动物的叫声,要求如下: 1.编写抽象类Animal Animal抽象类有两个抽象方法cry()和getAnimalName(),即要求各种具体的动物给出自己的叫声和种类名称。 2.编写模拟器类Simulator 该类有一个playSound(Animal animal)方法,该方法的参数是Animal类型。即参数animal可以调用Animal的子类重写cry()方法播放具体动物的声音,调用子类重写的getAnimalName()方法显示动物种类的名称。 3.编写Animal类的子类:Dog和Cat类 Dog类和Cat类分别继承于Animal类,并重写Animal类中的抽象方法。 4.编写主类MainTest类 在主类MainTest类中的main方法中至少包含如下代码: Simulator simulator=new Simulator(); simulator.playSound(new Dog()); simulator.playSound(new Cat());
应用编程题(共8分) 设计一个动物声音“模拟器”,希望模拟器可以模拟许多动物的叫声,要求如下: 1.编写抽象类Animal Animal抽象类有两个抽象方法cry()和getAnimalName(),即要求各种具体的动物给出自己的叫声和种类名称。 2.编写模拟器类Simulator 该类有一个playSound(Animal animal)方法,该方法的参数是Animal类型。即参数animal可以调用Animal的子类重写cry()方法播放具体动物的声音,调用子类重写的getAnimalName()方法显示动物种类的名称。 3.编写Animal类的子类:Dog和Cat类 Dog类和Cat类分别继承于Animal类,并重写Animal类中的抽象方法。 4.编写主类MainTest类 在主类MainTest类中的main方法中至少包含如下代码: Simulator simulator=new Simulator(); simulator.playSound(new Dog()); simulator.playSound(new Cat());
Though he had often made his little sister _____, today he was made ____ by his little sister. A: A.cry; to cry B: B. crying; crying C: C. cry; cry D: D. to cry; cry
Though he had often made his little sister _____, today he was made ____ by his little sister. A: A.cry; to cry B: B. crying; crying C: C. cry; cry D: D. to cry; cry
When I heard the sad news I couldn't help ______. A: crying B: cry C: to cry D: being cry
When I heard the sad news I couldn't help ______. A: crying B: cry C: to cry D: being cry
The girl couldn’t help ______ when her picture book fell into the river. A: cry B: crying C: to cry D: but to cry
The girl couldn’t help ______ when her picture book fell into the river. A: cry B: crying C: to cry D: but to cry