Answered step by step
Verified Expert Solution
Link Copied!

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!
image text in transcribed
character.java:
image text in transcribed
friendly .java
image text in transcribed
unfriendly .java
image text in transcribed
healer:
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

Understand the difference between bureaucratic and clan control

Answered: 1 week ago