creation of the extractResult() method in DefaultSolution class