Question: All code within the ***...*** needs to be implemented!! Multidimensional arrays . Create a project Lab12_MultArrays. Implement a program that keeps track of shots fired

All code within the ***...*** needs to be implemented!!

Multidimensional arrays. Create a project Lab12_MultArrays. Implement a program that keeps track of shots fired in a battleship game. Your program should ask the user if she wants to take another shot, ask for shot coordinates and then print the locations of all shots fired so far in a grid. Here is an example dialog:

The output of the code should look like this!!

Another shot? [y/n] y Location? a 1 All fired shots a b c d e 1 * * 2 * 3 4 * * 5 * Another shot? [y/n] y ... 

You do not have to keep track if multiple shots were fired in the same location, i.e. you should show a single star to indicate that the shot was fired there. You do not have to join this program with previously developed battleship program.

You should store the shots in a two-dimensional array of booleans. You should use the following code as a starting point. ***http://vega.cs.kent.edu/~mikhail/classes/csi/Labs/Lab12/shotsMultArrays.cpp***

Refer to this program for multidimensional array example usage. http://vega.cs.kent.edu/~mikhail/classes/csi/Labs/Lab12/list.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!