public class RationalNumber
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
denominator |
int |
numerator |
Constructor and Description |
---|
RationalNumber(int numerator,
int denominator) |
Modifier and Type | Method and Description |
---|---|
double |
getValue() |
RationalNumber |
simplify() |
int[][] |
toMatrix(int factor,
RationalNumber... rationals) |
java.lang.String |
toString() |
public double getValue()
public RationalNumber simplify()
public int[][] toMatrix(int factor, RationalNumber... rationals)
public java.lang.String toString()
toString
in class java.lang.Object