Webber, Chapter 13, Exercise 10.
DUE WEDNESDAY, FEB. 24TH. Submit your java files to inquire by the beginning of class.
Write a class in Java called Fraction
, which represents
a generic fraction object. Towards that end, you must have:
add(otherFraction)
,
sub(otherFraction)
,
mul(otherFraction)
,
and div(otherFraction)
. These should return a new
Fraction object, as opposed to modifying the current fraction
object.
Create a program you can use to test your program. Make sure you test all of the methods of your classes.