10.1. The AbstractProblem Class |
If we study the problem.java code, in JGDS v3.5 or update version, we will see a set of procedures and funtions that belong to the several implemented problems. The main procedures, that are common to all the implemented problems, have been extracted from Problem class to create a new class named AbstractProblem. This class contains the procedures and functions that must be implemented in all the problems code, and these may be considered as the kernel of every problem. Also, we added two functions to control the evaluations counter.
AbstractProblem class implementation
Therefore, every problem must compulsorily have a print_solution procedure and a evaluate function. The Problem class will call to the AbstractProblem constructor inside of its constructor. In the following table we can see underlining the modifications made in the Problem class
|