Scala class for representing and performing operations on rational numbers.