The knapsack problem is a well known optimization problem where you want to pack items within a limited room. The items have a value, which indicates how much you would like to take them with you. This script doesn't find the best solution (so it doesn't maximize the value). But it gives a hint on how to program this heuristic with java in a object oriented way.
- Item: to build items
- ItemTest: the main script to be executed
- Knapsack: different functionalities (like pack the knapsack or calculate if weight can be included in knapsack until capacity)