Class Battleship


public class Battleship extends Ship
A Ship with a length of four tiles.
Author:
harry
  • Constructor Details

    • Battleship

      public Battleship()
      Sets the inherited length variable and initializes the hit array, based on the size of this ship (4 tiles).
  • Method Details

    • getShipType

      public String getShipType()
      Specified by:
      getShipType in class Ship
      Returns:
      "Battleship", indicating that this is a Battleship.