Package it.unimi.di.prog2.s10
Class RationalNumberClient
java.lang.Object
it.unimi.di.prog2.s10.RationalNumberClient
A class to exercise a
RationalNumber
.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RationalNumberClient
private RationalNumberClient().
-
-
Method Details
-
main
Tests some methods ofBoundedIntQueue
.Reads a list of pairs of integers from the standard input, corresponding to the numerator and the denominator of a sequence of rational numbers \( q_i \). Computes the sequence of rational numbers given by \( r_0 = 0 \) and \( r_{i+1} = q_i + r_i \cdot q_i \). Then compares the last computed rational number with the rational number given by the pair of integers given as command line arguments emitting true in the standard output if they are equal, false otherwise.
- Parameters:
args
- the numerator and denominator of the resulting fraction.
-