Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How do I change the parameters in question while in Java? public class Enemy { int x , y , z ; , ? ?
How do I change the parameters in question while in Java?
public class Enemy
int ; global variables
variables above, methods below
Enemy
;;;
Enemy int newx, int newy, int newz constructor
newx; newy; newz;
void moveposition int xdif, int ydif, int zdif method
xdif ; ydif ; zdif;
System.out.println Enemy moves to :::;
end of class Enemy
Write one line of code to declare a reference variable named: theenemy
Declare only, do not CREATE the object
correct
Write one line of code to declare a reference variable named: aenemy
AND create the object using the default constructor
correct
Write one line of code to declare a reference variable named: enemyobject
AND create an object using the constructor with parameters
all values for the parameters should be
INCORRECT
Write one line of code to move the object using the variable: enemyobject
On the axis move on the axis move on the axis move
INCORRECT
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