How to solve this fraction problemïŒ
public FractionInterface add(FractionInterface secondFraction) { // implement this method! // a/b + c/d is (ad + cb)/(bd) // invoke covert() and reduce() before return the result Fraction newFraction = new Fraction(num,den); secondFraction.num = newFraction.num*secondFraction.den + newFraction.den*secondFraction.num; secondFraction.den = newFraction.den * secondFraction.den; setFraction(secondFraction.num,secondFraction.den); secondFraction.convert(); secondFraction.reduce(); return secondFraction; } // end add the first fraction is firstOperand = new Fraction(7, 8); and the second fraction is (9,16); and should pass the class"public FractionInterface add" like Fraction nineSixteenths = new Fraction(9, 16); double result = firstOperand.add(nineSixteenths); after add, the result should be (7*16 + 9*8)/(8*16); my problem is how to get the secondFration num and den`s value. as my code, secondFraction.num is an error because num cannot be resolved or is not a field. how to solve this isuue? thanks