Answer to Question #335838 in Java | JSP | JSF for Yang

Question #335838

Create the Animal class, which is the abstract superclass of all animals







-Declare a protected integer attribute called legs, which records the number of legs for this animal.








-Define a protected constructor that initializes the legs attribute.








-Declare an abstract method eat.








-Declare a concrete method walk that prints out something about how the animals walks (including the number of legs).








2.Create the Spiderclass.








-The Spider class extends the Animal class.








-Define a default constructor that calls the superclass constructor to specify that all spiders have eight legs.








-Implementthe eatmethod.








-Create the Petinterface specified by the UML diagram.








-Create the Cat class that extends Animaland implements Pet.








-This class must include a Stringattribute to store the name of the pet.












0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS