Fun with object oriented programming and the knapsack problem.