Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Just write the java code. Please fastly Question 250pt]: Write the necessary codes for the given UML class diagrams. In main method, create 2 objects;

image text in transcribed

Just write the java code. Please fastly

Question 250pt]: Write the necessary codes for the given UML class diagrams. In main method, create 2 objects; one from KibishiFighter and one from HybridFighter classes, and create variable called isDead (boolean). While any Fighter is alive (isDead false), one should attack another, and its opponent should defense. Each attack method (attackTo, judo Attack To etc.) should decrease (you decide amount) the health of opponent Fighters. Defense methods increase belonging fighter's health. Print out their health when one is dead. Note that methods in Kibishi Fighter and HybridFighter classes were not written. However, you can know them using parent-child (superclass-subclass) relationship given by UML. > > > Judo AttackBehaviours MuayThaiAttackBehaviour - BoxingAttackBehaviour - Fighter judoAttack TofFighter opponent) 3 - Fighter muayThaiAttack To Fighter opponent) -Fighter boxingAttack To Fighter opponent) > Fighter String name sint health > > > +Fighter (int health. String name) - Fighter attack To Fighter opponent) void defense Hybrid Fighter KibishiFighter *Hybrid Fighter fint health, String name) +KibishiFighter(int health, String name) OOPfinal02 static Stringll main(String[] args)

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

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

l Discuss several ways to manage a surplus of human resources.

Answered: 1 week ago