Uses of Class
battleship.Ship

  • Uses of Ship in battleship

    Subclasses of Ship in battleship
    Modifier and Type
    Class
    Description
    class 
    The type Barge represents a ship with a size of 1 unit.
    class 
    The type Caravel represents a ship with a size of 2 units.
    class 
    The type Carrack represents a ship with a size of 3 units.
    class 
    The type Frigate represents a ship with a size of 4 units.
    class 
    The type Galleon represents a ship with a size of 5 units.
    Methods in battleship that return Ship
    Modifier and Type
    Method
    Description
    static Ship
    Tasks.readShip(Scanner in)
    This operation reads data about a ship, build it and returns it