Question: Java: Please put comments above the code so i know what each line does. ----- Code that does some of it : https://pastebin.com/ECh0LjTR Sample output
Java: Please put comments above the code so i know what each line does.


-----
Code that does some of it :
https://pastebin.com/ECh0LjTR
Sample output might look like this: 10:13 (162): java mine Placing mines.. . MM Placing numbers... 1 3 M 2 M 1 Objective To create and manipulate two dimensional arrays Assignment: We're going to create something similar to (but not quite) minesweeper-ish in this assignment. I've been asked if what we're doing is how minesweeper was made. While I don't have the source code for minesweeper, I can say with some confidence that yes, it involves 2-D arrays. We're going to implement a little simpler version of this. What your program will do: on a 5x5 grid, you'll randomly place 5 "mines". For each square that isn't a mine, you'll put a number in the square which represents the number of adjacent mines in the North, South, East, and West directions (no diagonals. Note that this is a deviation from normal minesweeper, which does look at diagonals). Mines and totals will then be printed to the screen. Sample output is on the next page. How (internally) mines, blank squares, and numbers are represented is up to you, but do make sure that an end-user can determine what is what. In my scheme, I used M for mines,.for blank squares, and numbers for numbers. You must use a method for calculating the number of adjacent mines. You must use a two-dimensional array to represent the minefield
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
