Question: Q1 Q2 Please dont copy the answer from the other reponses to this question previously as they are wrong. C++ and thanks so much! Also
Q1
Q2

Please dont copy the answer from the other reponses to this question previously as they are wrong. C++ and thanks so much! Also keep in mind that these are seperate questions, so keep the code for both seperated thanks.
Now we'll write another class battleShip. If you're not familiar with the game, it might helpful to go read up on it before doing this question. https://en.wikipedia.org/wiki/Battleship_(game) class battleshipt public: battleship(string); battleship); void setshipName(string) string getshipNameO void setsize(int) int getsize) void recordHito bool issunk) 1/ returns true if hits is greater than equal to size // Increments the hits data member private string name; int size int hits 5 For this question, we've provided a complete class definition in the coderunner box. Write the function definitions for all 8 member functions of the battleShip class. The constructor battleShip(string) takes the ship name and should set all the data members of the ship to the correct value. The default size of a ship should be-1. What should hits be set to for a new ship? The function record Hit() should print"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
