A Java class that implements a Ratio type.