Science, asked by rewaasrour2000, 4 months ago

Examine the following codes and draw the class diagram.
abstract public class Animal { abstract public void greeting();

}

public class Cat extends Animal {
@Override

public void greeting() {
System.out.println("Meow!");

public class Dog extends Animal {
@Override

public void greeting() {

System.out.println("woof!");

}

public void greeting(Dog another) {

System.out.printin("Woooooooooof!");
}
}

public class BigDog extends Dog {
@Override

public void greeting() {

System.out.println("woow!");

}

@Override

public void greeting(Dog another) {

System.out.println("woooooowwwww!");
}
}

Answers

Answered by dheerajkg8931
0

Answer:

wood!

woooooooowwwww!

Similar questions