A4. Given the followng dlass diagram, mterfaces and classes that model various kinds of animals. What will be the errors in the main method? For each error, mdicate the line number of each incorrect...


A4. Given the followng dlass diagram, mterfaces and classes that model various kinds of animals. What will be the errors in the<br>main method? For each error, mdicate the line number of each incorrect statement and explain in one sentence why it is wrong.<br>interface Anial (<br>int mumberüflags();<br>interface Haamal extands Aninal ()<br>孝<br>interface Raptile extenda Aninal (}<br></nterface>><br>Animal<br>clana Cat implementa Manal (<br>public int Dber0fLagu 0C<br>return 4<br>10<br>numberOfLegs0 int<br>13<br>clans Tiger extenda CatO<br><<Interface>><br>Mammal<br><<Interface>><br>class Snake implements Roptile<br>prblic int numberOflegs() {<br>return 0<br>Reptile<br>Pblie taic void saln StringlarEN)<br>Antaal anial aninal2 aninal3<br>Mannal nall<br>Cat cat1<br>Snake snakeI.<br>Tiger tigerE<br>Cat<br>Snake<br>+numberOfLegs0 int<br>+numberOfLegs) int<br>, Tiger<br>Tiger<br>catt<br>nalt<br>ew Aninal<br>w Tigeri<br>Seaker<br>listi<br>

Extracted text: A4. Given the followng dlass diagram, mterfaces and classes that model various kinds of animals. What will be the errors in the main method? For each error, mdicate the line number of each incorrect statement and explain in one sentence why it is wrong. interface Anial ( int mumberüflags(); interface Haamal extands Aninal () 孝 interface Raptile extenda Aninal (} > Animal clana Cat implementa Manal ( public int Dber0fLagu 0C return 4 10 numberOfLegs0 int 13 clans Tiger extenda CatO > Mammal > class Snake implements Roptile prblic int numberOflegs() { return 0 Reptile Pblie taic void saln StringlarEN) Antaal anial aninal2 aninal3 Mannal nall Cat cat1 Snake snakeI. Tiger tigerE Cat Snake +numberOfLegs0 int +numberOfLegs) int , Tiger Tiger catt nalt ew Aninal w Tigeri Seaker listi

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here