Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA You are to create the framework for a Battleship game. You need to create a 5x5 grid that represents the gameboard. + signs represent

JAVA

You are to create the framework for a Battleship game. You need to create a 5x5 grid that represents the gameboard. "+" signs represent spaces that haven't been bombed. "O" represents spaces that have been bombed, but nothing was hit. "X" represents spaces where the player has bombed and hit something.

For example:

+++++

++++O

+++X+

+++X+

+++++

The user will enter a grid space by entering two integers that represent the X and the Y coordinates on the grid. Similar to how we did the TicTacToe assignment.

You will create a battleship that class that represents the ship. It will contain the data about it's own hits and will know when all of it's spaces have been hit and it is sunk.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

Understand the primary objectives of performance appraisals

Answered: 1 week ago

Question

LO5 Highlight five external recruiting sources.

Answered: 1 week ago