Answered step by step
Verified Expert Solution
Question
1 Approved Answer
create an attacker class java. do not change other classes. NEED ASAP! character.java: friendly .java unfriendly .java healer: tacker Character Subclass Create a class called
create an attacker class java. do not change other classes. NEED ASAP!
tacker Character Subclass Create a class called Attacker which is a subclass of Unfriendly This class should be able to do everything an unfriendly class could, but it should also be able to attack other characters. How you choose to implement this attacking function is up to you as long as it does A character that is at 0 health cannot be attacked. [name]: You show such weakness [other - A character that can be attacked will take different amounts of damage based on what subclass the following: character name]." should be printed. they are: A friendly subclass should take 5 damage. Their health should not fall below 0 * An unfriendly subclass should take 3 damage. Their health should not fall below 0. If the other character has above 0 health after being attacked, "[name]: Now you're only at [other character health] health. How does it feel [other character name] !?" should be printed. If the other character is at 0 health, Cname]: You were no match for me [other character name]." should be printed. -An attacking character cannot attack themselves. This class should attack other classes when interacting with them. Don't forget to greet the other class first like a normal Unfriendly character.java:
friendly .java
unfriendly .java
healer:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started