A class for sorting books