Class Battleship
java.lang.Object
Ship
Battleship
A Ship with a length of four tiles.
- Author:
- harry
- 
Field Summary
- 
Constructor SummaryConstructorsConstructorDescriptionSets the inheritedlengthvariable and initializes thehitarray, based on the size of this ship (4 tiles).
- 
Method SummaryMethods inherited from class ShipgetBowColumn, getBowRow, getLength, isHorizontal, isSunk, okToPlaceShipAt, placeShipAt, setBowColumn, setBowRow, setHorizontal, shootAt, toString
- 
Constructor Details- 
Battleshippublic Battleship()Sets the inheritedlengthvariable and initializes thehitarray, based on the size of this ship (4 tiles).
 
- 
- 
Method Details- 
getShipType- Specified by:
- getShipTypein class- Ship
- Returns:
- "Battleship", indicating that this is a Battleship.
 
 
-