public void setpedFlag(boolean pflg) {
midipedalflag = pflg;
}
public boolean getpedFlag() {
return midipedalflag;
}
These two methods reside in the second class to be used again in a third class. Maybe it is all to complicated. Anyway the code subject to discussion should just test the working of the pedal before its use in the third class.