Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAVA Using the algorithm for the Arrays assignment. Create a 3D Battle ship program making use of a 3 dimensional array. 1. There will

In JAVA

Using the algorithm for the Arrays assignment. Create a 3D Battle ship program making use of a 3 dimensional array.

1. There will be 5 ships that will be hidden anywhere on each level.

2. The board will be 3 X 10 X 10

3. Randomly generate each hiding space for each ship.

4. A ship can only be on one level

5. A ship size will denote the number of elements it takes up. Ship 1 = 2 Ship 2 = 3 Ship 3 = 3 Ship 4 = 4 Ship 5 = 5

After hiding the ships, allow the user to guess where the boats are one element at a a time M

ark the found elements on the two dimensional table to show progress.

Give the user a hint if it is a near miss (one element off - left right, front, back, up or down).

Give the user a limit to the amount of guesses made.

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions