Moved override method compareTo from Task.java to subclasses, each with diff implementation.