Java Program Output Based Budgeting