Class Rational

java.lang.Object
  |
  +--Rational

public class Rational
extends java.lang.Object

Rational numbers (those that can be expressed as the ratio of two integers).


Constructor Summary
Rational(long num, long denom)
          Create the rational number num/denom.
 
Method Summary
 Rational multiply(Rational a, Rational b)
          Multiply a by b.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rational

public Rational(long num,
                long denom)
Create the rational number num/denom.

Method Detail

multiply

public Rational multiply(Rational a,
                         Rational b)
Multiply a by b.