Question: These are my two instructions but my code is wrong A game has 1 PlayerShip called player and 3 instances of EnemyShip called enemy1,enemy2 and

These are my two instructions but my code is wrong
A game has 1 PlayerShip called "player" and 3 instances of EnemyShip called "enemy1","enemy2" and "enemy3"
A constructor for class Game creates the player ship and three enemy ships.
 These are my two instructions but my code is wrong A

public class Game // instance variables replace the example below with your own private PlayerShip player; private EnemyShip enemy1; private EnemyShip enemy2; private EnemyShip enemy3 public Game() PlayerShip player new PlayerShip(); EnemyShip enemy1new EnemyShip(); EnemyShip enemy2new EnemyShip() EnemyShip enemy3new EnemyShip()

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!