A Linear Programming Framework for Flexible Budgeting and Its Application to Classroom Teaching