Exercise Set 7: Battleships

Exercise 7.1 The goal of this exercise is to use what you learned about data structures and class hierarchy design by implementing a battleship game to be played over the network.
The Battleship game is defined as follows.

Two players play against each other. Each has a board with 10 rows and 10 columns. At the beginning of the game, each player places the available battleships onto the board, hidden from the opponent's view. Players then take turns guessing the locations of the opponent's ships. The first player to destry all of the opponent's ships wins.

Design a program, which simulates one player playing against a human opponent, using the console for communications, as follows:

The preliminary design of the record of the game and a way to play against a human with console input is available. The code needs refactoring to separate the communications part from the game record (see below). Try the code to play against a human player in the console.