Question: Using the promptInt method in class Global, a constructor for class PlayerShip reads input from the user and initialises the position field. Your code should
* Write a description of class PlayerShip here * author (your name) :vsi version nunber or a date) public class PlayerShip // instance variables replace the example below with your own private int position; private Gun gun1: private Gun gun2 public Playership() // initialise instance variables position Global.promptInt(" player position:")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
