Modifier and Type  Class and Description 

class 
MixedNumber
This class encapsulates a mixed number.

class 
Money
This class encapsulates an amount of money.

Modifier and Type  Method and Description 

Fraction 
Fraction.cloneMe()
Copy the state of
this object. 
static Fraction 
Money.getRandom()
Create a random fraction.

static Fraction 
MixedNumber.getRandom()
Create a random mixed number with a randomly
selected sign and with a whole part,
proper numerator, and denominator uniformly
distributed in [0,1000) (but no zerodenominator
mixed number is generated).

static Fraction 
Fraction.getRandom()
Create a random fraction.

Modifier and Type  Method and Description 

void 
Fraction.add(Fraction other)
Add the passed fraction to the fraction on which it was called.

int 
Fraction.compareTo(Fraction other)
Compare this object with the specified object for order.

void 
Fraction.divide(Fraction other)
Divide the fraction on which the method was called by the passed
fraction.

void 
Fraction.multiply(Fraction other)
Multiply the fraction on which the method was called by the passed
fraction.

boolean 
Fraction.resembles(Fraction other)
Determine if
this fraction resembles the passed one. 
void 
Fraction.setFraction(Fraction other)
A mutator for
this fraction. 
void 
Fraction.subtract(Fraction other)
Subtract the passed fraction from the fraction on which it was called.

Constructor and Description 

Fraction(Fraction fraction)
Construct a copy of the passed Fraction.
