Question: Java: Name your class for this lab District. Write a program that reads in a 10x10 array of integers, and stores them in a two-dimensional

Java:

Name your class for this lab District. Write a program that reads in a 10x10 array of integers, and stores them in a two-dimensional array. The grid will represent a voting district map, where each square in the grid has an integer district number associated with it. For example, with input

Java: Name your class for this lab District. Write a program that

reads in a 10x10 array of integers, and stores them in a

111 4 444 499 1111 444 999 2 111 445999 2 2 2 5 5 55 8 9 9 2 2 25 5 5 8 8 8 0 2 2 255 8 88 8 0 3 3 6 6 6 8 87 0 0 3 3 6 6 6 7 7700 3 33 666770 0 3 3 3 6 77770 0 District "1" consists of the ten grid squares in the upper left, spanning rows 0, 1 and 2, and across columns 0-4. Detect the boundaries of the District"1", and output the shape of District "1" only, ignoring all other districts in the grid. For the above input, the output would be As another example, with this input: 7 77 4444 49 9 7777 44499 9 2777 445 99 9 2 2 25555899 2 2 2 5 5 5 8 880 2 2 255 8 88 8 0 3 3 6 6 6 8 8 1 0 0 3 36 6 6 11 10 0 3 33 6 66 110 0 3 3 3 6 11110 0 th e expected output would be

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

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

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!