import javax.swing.JOptionPane;
public class rationaltest
{
public static void main(String arg[])
{
rational r1=new rational(1,2);
rational r2=new rational(1,3);
r2.add(r1);
 JOptionPane.showMessageDialog(null,r2.toString(),
     "rational number class",JOptionPane.PLAIN_MESSAGE);
}
}