The cmp method of the Book class appears to be incorrect. For reference (per google) after 2006 ISBNs have 13 digits. As discussed elsewhere, something like (ulonga > ulongb) - (ulongb > ulonga) should work.