Posts

Showing posts with the label homework 3

CS 3401 Homeworks 3

Homework # 3 Exercise #1 Write an implementation of the Rational.java class and that uses BigInteger for numerator and denominator. Write a test driver class called TestRational.java that creates at least two Rational numbers (using BigIntegers as the arguments to the Rational constructor) and then adds, subtracts, multiplies and divides the Rational numbers and tests them for equality, printing out the results of each of these operations. Be sure your programs compile and run without error. Review the Submission Requirements document and make sure your submission meets those requirements. Please also review the Grading Guidelines for an indication of general guidelines used in evaluating your assignments. Deliverables Turn in the files:     Rational.java     TestRational.java ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Rational.java package assignment3; import java.math.BigIntege...