Question: Reimplement Exercise E10.13 where the grid is unbounded. The constructor has no arguments, and the row and column parameter variables of the add and
Reimplement Exercise •• E10.13 where the grid is unbounded. The constructor has no arguments, and the row and column parameter variables of the add and getDescription methods can be arbitrary integers.
Data from Exercise E10.13
Implement a class Grid that stores measurements in a rectangular grid. The grid has a given number of rows and columns, and a description string can be added for any grid location. Supply the following constructor and methods:
public Grid (int numRows, int numColumns) public void add (int row, int column, String description) public String getDescription (int row, int column) public ArrayList getDescribed Locations() Here, Location is an inner class that encapsulates the row and the column of a grid location.
Step by Step Solution
3.31 Rating (148 Votes )
There are 3 Steps involved in it
To reimplement Exercise E1013 with an unbounded grid we will modify the original Grid class to not limit the size of the grid by rows and columns Inst... View full answer

Get step-by-step solutions from verified subject matter experts