2. Add a category to the Fraction class called Comparison. In this category, add two methods according to these declarations: -(BOOL) isEqualTo: (Fraction *) f; -(int) compare: (Fraction *) f; The first method should return YES if the two fractions are identical and should return NO otherwise. Be careful about comparing fractions (for example, comparing 3/4 to 6/8 should return YES). The second method should return –1 if the receiver compares less than the fraction represented by the argument, return 0 if the two are equal, and return 1 if the receiver is greater than the argument.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here