Least Cost Method Questions Java