THIS IS A C++ CODE. Please dont use the one found online. Use object oriented pr
ID: 3888207 • Letter: T
Question
THIS IS A C++ CODE. Please dont use the one found online. Use object oriented programming techniques.
Program the game of battleship against the computer. Each side
has 2 grids. The first grid contains the location of the player’s ships. The second grid contains the location of the player’s shots and the outcome of the shot (hit or miss). The objective is to hit and sink all 5 enemy ships before they do the same to you. Each side recieves ships listed in figure 1.
Add statements to the main() function to do the following:
The grids are 10 x 10 squares.
Use whatever method is expedient to generate the computer
moves; this isn’t an AI class.
Constraints.
• Filter the input for valid numbers.
• Use Object Oriented Programming techniques.
• Use a Ship class.
• Use an assert to protect at least two of your methods.
carrier- size 5
Battleship- size 4
crusier- size 3
sub- size 3
destroyer- size 2