Answer to Question #331310 in Java | JSP | JSF for sed

Question #331310

Create a class for Waterbender, Earthbender, Firebender, and Airbender as subclasses of the superclass Avatar. The subclasses provide their actual implementation, Firebender must return a String containing the phrase "Fire attack!”, Waterbender = “Water attack!”, Airbender = "Air attack!”, and Earthbender = "Stone attack!". Create a testdriver called TestAvatar to demonstrate the classes. Apply the concept of Inheritance and Polymorphism.





Sample Output:


Fire attack!


Water attack!


Air attack!


Stone attack!


Default attack!




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
APPROVED BY CLIENTS