public void setweight(int newweight){
if (newweight > 0){
weight = newweight;
}
}

If newweight is greater than zero, you update the weight of the dog. Cool!
However, what if the weight is...