Question: Need help with JAVA FractionInterface result = null; result = firstOperand.add(nineSixteenths); the nineSixteenths is this Fraction nineSixteenths = new Fraction(9, 16); the .add class is

Need help with JAVA

FractionInterface result = null; result = firstOperand.add(nineSixteenths);

the nineSixteenths is this Fraction nineSixteenths = new Fraction(9, 16);

the .add class is this public FractionInterface add(FractionInterface secondFraction) {

//I am given: numerator = 4

denominator = 16

// so here if we do a println(secondFraction); it prints out "9/16"

I am given an int numerator = 4, and int denominator = 16, how do I get the numerator and denominator out of secondFraction so that I can add them? return null; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!