Question: Java: Prompt the user to enter a column and row. ( Columns are A through J . Rows are 1 - 9 ) . Your

Java: Prompt the user to enter a column and row. (Columns are A through J. Rows are 1-9). Your goal is to ask to user to choose a column and row and then display whether they hit or missed. Whether the ship has been sunk or not
The name of the program should be Assignment5.
3 comment lines (description of the program, author, and date).
Ship should now be a class. The Ship Class should have 5 subclasses: aircraft carrier (5 spaces), battleship(4 spaces), cruiser(3 spaces), submarine (3 spaces), and destroyer(2 spaces).
A ship of each type should be placed randomly on the grid not just one.
o Ships cant occupy the same space.
The program must display when the user sinks a ship.
The user can continue to guess positions on the grid until they miss 10 times, or all 3 ships have been sank
Once the game ends ask the user if they want to play again. If they want to play again, repeat the game.
Otherwise, end the program

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 Programming Questions!