Question: Themption Status: uestruivo Write the code for a player class. A Player has the following fields: a . An x and y position, which could
Themption Status:
uestruivo
Write the code for a player class. A Player has the following fields:
a
An and position, which could be any real number
b
A health value, which should be an integer between and
c isPoweredUp, which should be a boolean indicating whether or not the Player has a power up
A player also has the following methods:
a
Getters for health, and ispoweredUp
b
void walkString direction, double time
i direction should be one of "left" or "right". If it is "left", the x value should be adjusted down. If "right", the x value should be adjusted up
ii
c
boolean bump
i O
Click Save and Submit to save and submit. Click Save All Answers to save all answers.
Sact and subme
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
