Implemented a ComparableTask that implements a Comparator, that is used to compare the priority of two given tasks