public void checkBounds(){
  if (strength > upperBound) {
    strength=upperBound;
  }
  if (strength < lowerBound) {
    strength=lowerBound;
  }
}

public void checkBounds ( ) { if ( strength > upperBound ) { strength = upperBound ; } if ( strength < lowerBound ) { strength = lowerBound ; } }
if weight value is above or below its bounds set it to those bounds .
