Question: JAVA A completed program: AreaFillT.class is provided for your testing. To testing this program, enter coordinates in the argument list input area. For example, 2

JAVA

JAVA A completed program: AreaFillT.class is provided for your testing. To testing

A completed program: AreaFillT.class is provided for your testing. To testing this program, enter coordinates in the argument list input area. For example, 2 3 means for the third row and fourth column. Then use one of the data file: area.txt, area2.txt, and area3.txt to test this program. For example: enter 2 3 *area2.txt in the Cmd argument list then run AreaFillT.class, you should get the following results: AreaFillT.class: Results ..........00 ...0....0000 ...000000000 0000.....000 ............ ..#########. ..#...#####. ......#####. ...00000.... after filling ..........** ...*....**** ...********* ****.....*** ............ ..#########. ..#...#####. ......#####. ...00000.... 

Given Files:

* area.txt:

15 32 xxxx............................ ...xx........................... ..xxxxxxxxxxxx.................. ..x.........xxxxxxx............. ..x...........0000xxxx.......... ..xxxxxxxxxxxx0..000............ ..xxxxxxxxx...0...00.....0000000 ..........xx.......0000000000000 .....xxxxxxxxx........0......... ....xx.................00000.... ....xx.....................00... .....xxxxxxxxxxxxxxxxxx....00... ......................xx...00... .......................xxxx00000 ............................0000

* area2.txt:

9 12 ..........00 ...0....0000 ...000000000 0000.....000 ............ ..#########. ..#...#####. ......#####. ...00000....

* area3.txt

4 3 +++ @+@ @+@ @@@

Several text files (area.txt, area2.txt, and area3.txt) contain two integers followed by rows and columns filled with different characters. Study the format of the text file area2.txt: 9 12 ..........00 .0....0000 000000000 0000.....000 . . = . = .. = - 00000 First, read and display the contents of this matrix to the screen. Second, prompt the user for (row.col) coordinates (what are passed to your program through command line argument list). Note the character that is stored in that position Replace that character with a '*'. Then recur up, down, left, and right, (but NOT diagonally) and replace similar characters with '*. Study these two examples: Filename: area2.txt Enter ROW COL: 1 3 . . Filename: area 2.txt Enter ROW COL: 1 2 **********00 *******0000 ***000000000 0...-:.000 + + * . + + * . + * . . . . . TE # #. # #. . HO # # . 00000 . ! . . Display this new matrix. Hints: Filling an area, which is similar to escaping a maze, is naturally recursive. What are the base cases? Several text files (area.txt, area2.txt, and area3.txt) contain two integers followed by rows and columns filled with different characters. Study the format of the text file area2.txt: 9 12 ..........00 .0....0000 000000000 0000.....000 . . = . = .. = - 00000 First, read and display the contents of this matrix to the screen. Second, prompt the user for (row.col) coordinates (what are passed to your program through command line argument list). Note the character that is stored in that position Replace that character with a '*'. Then recur up, down, left, and right, (but NOT diagonally) and replace similar characters with '*. Study these two examples: Filename: area2.txt Enter ROW COL: 1 3 . . Filename: area 2.txt Enter ROW COL: 1 2 **********00 *******0000 ***000000000 0...-:.000 + + * . + + * . + * . . . . . TE # #. # #. . HO # # . 00000 . ! . . Display this new matrix. Hints: Filling an area, which is similar to escaping a maze, is naturally recursive. What are the base cases

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!