Assignment about proving that matter has an atomic nature using Java
I'm confused about what I need to do for the BlobFinder constructor. Someone told me that I should “initialize the ArrayList blobs”, then “create a 2D array of booleans called marked, having the same dimensions as picture.” then “eumerate the pixels of picture, and for each pixel (i, j): 1. Create a Blob object called blob., 2. Call findBead() with the right arguments. and 3. Add blob to blobs if it has a non-zero mass.”, but I'm confused as to why that is what I need to do. Don't I only need to do the following for the BlobFinder contructor?: for(int i = 0; i < picture.height(); i++) { for(int j = 0; j < picture.width(); j++) { Blob blob = new Blob(); blob.add(i, j); blobs.add(blob); } } I don't even need someone to write the code for me, but if someone could just explain to me in words/pseudocode what I need to do, it would help a lot. Any help would be greatly appreciated!
Join our real-time social learning platform and learn together with your friends!