Question: Blackboard Collaborate Ultra-PX D Bb Collaborate - Weekly Lab Ses * + n.com/5d2d98210a855/76489367X-Blackboard-Expiration=1612526400000&X-Blackboard... el 2 / 2 75% Exercise 2: Based on the following UML

 Blackboard Collaborate Ultra-PX D Bb Collaborate - Weekly Lab Ses *

Blackboard Collaborate Ultra-PX D Bb Collaborate - Weekly Lab Ses * + n.com/5d2d98210a855/76489367X-Blackboard-Expiration=1612526400000&X-Blackboard... el 2 / 2 75% Exercise 2: Based on the following UML of GameChar class: Create the Java class GameChar. (default constructor set to: name as player" - 100 points - I points/hit - I hit/sec) Use a test program to create three objects of type GameChar: (MAIN CLASS) playerl: Kim - 200 points - 2 pointshit - 2 hit/sec player2: Tom - 300 points - 3 points/hit -0.5 hit/sec player3: no details (call default constructor) Update "player3" to: Ben - 150 points - 3 points/hit-4 hit/sec Design fightWinner method in the test program (MAIN) that takes two GameChar objects and print the name of the winning character. Hint: the winner is the character that need less time to end the fight. Time PlayerA-Number of hits / Speed - Math.ceil(lifePoints(PlayerB) / strength(Player)) / speed(PlayerA) Print the winning scenarios between playerl, player2 and player3 using fight Winner method. (Pl vs P2 Pl vs P3, and P2 vs P3). GameChar name: String - lifePoints: int -- strength: int - speed: double + GameChar() + GameChar (String int, int, double) + setName(String): void getName(): String + setLifePants(int): void + getLifePoints() int + setStrength(int): void + getStrength Cint setSpeed (double): void + getSpeed Of double +toStringo: String W Q F6 F7 F8 Home End F9 F10 F11 F12 & * 6 7 8 9 7 0 V IL

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!