Comparator class added - Program updated