Knapsack Problem Dynamic Method Binding