The writer is very fast, professional and responded to the review request fast also. Thank you.
CMSC 401 Spring 2013 Program 6 – Battleships1 Program name: bs.java ZZ The puzzle described below is a solitaire version of the classic paper and pencil game of Battleships. The grid represents a section of the ocean in which the entire fleet is hiding. This fleet consists of one battleship (four grid squares in length), two cruisers (each three squares long), three destroyers (each two squares long), and four submarines (one square each). The ships may be oriented either horizontally or vertically, and NO TWO SHIPS WILL OCCUPY ADJACENT GRID SQUARES, EVEN DIAGNOLLY. The digits along the right side of and below the grid indicate the number of grid squares in the corresponding rows and columns that are occupied by vessels. In the puzzle, certain “shots” may have been taken to start you off. These may show ocean (O), a complete submarine (U), or the middle (M) or the end (N, S, E, W) of a longer vessel. Your task is to determine where the fleet is located. A sample puzzle is: 1 0 1 N 7 1 M 3 1 O 4 0 2 2 1 1 3 1 4 2 3 1 2 To facilitate data entry, the following will be in effect: 1. Input will be found in a file specified as a command line argument. 2. This file will consist of the following Row 1 10 numeric values representing the “hits for each row. Row 2 10 numeric values representing the “hits for each column. Row 3 a numeric value representing the number of “shots taken. Row 4.. Two integers representing the coordinates of the shot followed by 1 space and a character representing the results of the shot. Indices begin at 0. 3. The results of the shots are as follows O Water U Submarine S The south end of a vertical ship. W The west end of a horizontal ship. N The north end of a vertical ship. E The east end of a horizontal ship. M The middle of a ship (may be either…
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more