Question: USE C++ Pleas be CLEAR with COMPILABLE and COPIABLE CODES. PICTURE demonstration would be greatly appreciated. Thanks! Project 5.b [75 points] For this project you
USE C++ Pleas be CLEAR with COMPILABLE and COPIABLE CODES. PICTURE demonstration would be greatly appreciated. Thanks!

![would be greatly appreciated. Thanks! Project 5.b [75 points] For this project](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2fb16790bc_02166f2fb15db0f3.jpg)


Project 5.b [75 points] For this project you will write a couple of classes that could be used to make a program that plays the game Battleship e. The Ship class represents a ship that has: a name (e.g. "my destroyer", "my submarine", "Boaty McBoatface") a length (the number of squares it occupies) a damage (how many of its squares have been hit) a constructor that takes as parameters (in this order): the Ship's name and the Ship's length, which will be used to initialize the corresponding data members. The damage should be initialized to zero getMethods for each data member (getName, getLength, getDamage) a method called takeHit that increments a Ship's damage by one The Board class represents a 10x10 grid that holds some number of Ships. It should have a 10x10 array of bools (for keeping track of what squares have been attacked) a 10x10 array of Ship-pointers (for keeping track of which Ships occupy which squares) a variable that keeps track of the number of ships that remain un-sunk a constructor that initializes each element of the boolArray to false and each element of the Ship-pointer array to NULL (or nullptr if you prefer) a method called getAttacksArray that returns the bool array a method called getShipsArray that returns the Ship-pointer array a method called getNumShipsRemaining that returns how many ships remain un-sunk
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
