You need to write a toString() method in your RationalNumber class