我有一个额外的任务,我无法解决。我想将以下方法添加到 Fraction 类以完成对分数的算术运算。在每种情况下减少方法内的结果:
//Subtract argument from receiver
-( Fraction * ) subtract: (Fraction *) f;
//Multiply receiver by argument
-( Fraction * ) multiply (Fraction *) f;
//Divide receiver by argument
-( Fraction * ) divide (Fraction *) f;
向正确的方向轻推,或更具体的代码将不胜感激!