|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--ach.types.Rational
Class representing a rational number wher a numerator is to be divided by a denominator.
| Field Summary | |
int |
denominator
The denominator of a rational number |
int |
numerator
The numerator of a rational number |
| Constructor Summary | |
Rational(int numerator,
int denominator)
Constructs a rational number |
|
| Method Summary | |
double |
toDouble()
Convert a rational number into a double |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int numerator
public int denominator
| Constructor Detail |
public Rational(int numerator,
int denominator)
| Method Detail |
public double toDouble()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||