Add chap6 Rational class