Change the
Pets3class in Exercise 11, above, as follows: Replace all instances of
Pets3by
Pets4,and replace
Animal2by
Animal3.Then, write an
Animal3interface and
Dog3and
Cat3classes that implement
Animal3,so that when you run the Pets4 program and input either a ‘c’ or a ‘d,’ the program prints either “Meow! Meow!” or “Woof! Woof.”
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.