Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In java Se8, I am trying to do a pixel checker where true is black and false is

ID: 3920857 • Letter: I

Question

In java Se8, I am trying to do a pixel checker where true is black and false is white, however , base on the copyable code i pose above, I realize that it will count pixel more than one time but i do not know how to set the start point of four check direction at the beginning point since the method has to be recursive. And since this Myimage class is extended from image class, it shows there is no default constructor available in image which i could not figure out why. And the final question is how could i check whether or not there is holes in the image? since the image could have both color but not one colour in the component of the other colour?

Explanation / Answer

Why you get compile time errors is because You are using:
public Image(int rows, int cols){

in MyImage class. it should be constructor of MyImage class:
public MyImage(int rows, int cols){

Similarly do for other constructor too.
===================

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote