Quote (Minkomonster @ Nov 7 2014 11:58pm)
That makes sense. If I was to implement this my reduce method would be a private void method on my Fraction class
hmm i'd make it public. if i want a Fraction object to represent 10/100, i'm not sure i want it to auto reduce to 1/10 from the constructor. i'd only want it to auto reduce after performing arithmetic. maybe have a setting for it.

then again, i'm not sure i don't want it to auto reduce from the constructor either. not sure what the downsides are. thats just how apache commons does it iirc, but that's because their equals doesn't first reduce both fractions.
This post was edited by carteblanche on Nov 7 2014 11:12pm