Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

blobData.txt below: WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW

image text in transcribed

image text in transcribed blobData.txt below:

WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW WWWWWWWWWBBBBBBBBBBBBBBBB BBBBBBBBBBBWWWWWWWWWWWWWW WWWWWWWWWWWWWWWWWWBBBBBBB WWWWWWWWWWWWWWWWWWWWWWWWW
A is a two-dimensional array of characters of size 25x25. Each element of the array is either a B or a W. A blob is a connected group of one or more Bs. The connection can be horizontal, vertical, or any diagonal. Write a program, which reads an array as described above and prints: (1) how many blobs are in the array and (2) how many Bs are there in total. Read my notes for details. Input: A 25x25 character array. Filename: blobData.txt. Create a sample file for testing your program. When I run your program, I will provide my blobData.txt (which will be in the same folder as the Java program). Output: (1) The number of blobs in the array (2) The number of Bs in the array Hint: import java.io.File; import java.util.Scanner; public class PA3xxxxBlobProblem { static char[][] A = new char[25][25]; public static void main(String[] args) throws Exception{ int blobCount=0, totalBs=0, countNow = 0; File dataFile = new File("blobData.txt"); Scanner input = new Scanner(dataFile); String line; for (int i =0;i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What was the Dissents point?

Answered: 1 week ago

Question

Is there a clear hierarchy of points in my outline?

Answered: 1 week ago