A 2-dimensional digital picture has been received from a satellite as a
String[]. The characters in each String are only '0' or '1' (zero
or one). Some of the '1's are noise that should be filtered out. The filtering
rule is that a '1' should be removed if it is not part of a cross pattern
consisting of 5 '1's in the following configuration:
1
111
1
Write a class Filter that contains the method removable that takes a String[], picture, and returns the number of '1's that should be filtered out of picture.
|