class RatioNumber extends Number implements Comparable<RatioNumber> {

    public static RatioNumber valueOf(String valueString) {
        int pos = valueString.indexOf(":");

        if (pos > -1) {
            double value = Double.parseDouble(valueString.substring(0, pos));
            double ratio = Double.parseDouble(valueString.substring(pos + 1));
            return new RatioNumber(value, ratio);
        }

        throw new IllegalArgumentException("invalid string");
    }

    public  RatioNumber(double value, double ratio);

}