Battleship Doodles You should have the following classes: Administrator - who oversees the running of the whole game Player - who is guessing the ship's positions PlayerInfo - which records the results so far and generates next guess Enemy - who is responding to guesses EnemyInfo - which records the current ship's positions and generates the responses to guesses IOChannel - which is used to communicate the messages between the Player and Enemy - under the control of the Administrator this is an interface - we implement it as console, server socket, client socket GUI (if I find the time to do it) Administrator contains: Player Opponent IOChannel Administrator has the following methods: openGame() - initialize Player and Opponent define IOChannel object - can be console, GUI, or socket open the channel establish communications determine who goes first if (myturn) - call myGuess() else - call yourGuess() if unable to initiate the game - call shutDown() myGuess() - Player.playTurn() if not win, channel not closed - yourGuess() else - shutDown() yourGuess() - Opponent.playTurn() if not win, channel not closed - myGuess() else - shutDown() shutDown() - record the winner, final messages Player contains: PlayerInfo IOChannel Player has the following methods: initialize() - whatever is needed to set up the board, etc. playTurn() - PlayerInfo.selectGuess() - to select next guess write guess-message to the channel read reply-to-guess-message from the channel PlayerInfo.processResult() - to record the results write your-turn-message to the channel return info about win Opponent contains: OpponentInfo IOChannel Opponent has the following methods: initialize() - set up the board with ships - either via user interactions or at random, or using some mathematical strategy playTurn() - read guess-message from the channel OpponentInfo.processGuess() - to see if hit, miss; win write reply-to-guess message to the channel read your-turn-message return info about win IOChannel interface has the following methods: open() - open the channel - return true if successful return false if failed to open read() - return String read from the channel write(String) - write the given String to the channel close() - close the channel Message formats - so we can play against each other: guess-message: guess(2 3) guess(10 3) guess(4 10) guess(10 10) reply-to-guess-message: integer with values 2 through 5 - corresponding to the constants MISS WIN HIT REPEAT your-turn-message: String "Your turn"