implement compareTo method in class ModuleTask.