I have to create a program that when used with the test program below should produce the results below. So far I have this please help me. Thank you.

public class Rational {
private int num; ...