1 make a class rational to provide at least


1. Make a class Rational to provide at least following methos and constructors:



Rational r1= new Rational (3,5);



Rational r2= new Rational (4,7);



Rational r3=r1.add(r2);



// also sub,mult,divide methods



Other that four operations you should provid methos that you think is useful for user of your class.



2. Write a JFrame or JApplet (file name: TestRational.java) that performs the following tasks:



a) Define two arrays of size 10. Each element in the array references to a Rational object that you wrote in



Problem 1 above.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: 1 make a class rational to provide at least
Reference No:- TGS0288683

Expected delivery within 24 Hours