Richard Scott wrote:
Paul Clapham wrote:Your Fraction constructor produces an invalid fraction: 0/0 has no meaning. (And worse, it makes your calculations fail.) I would suggest 0/1 for a default whose value is zero.
ok that's fixed but its still not printing the double or the product
ok so I have updated the driver, I realized I was using the wrong one! here it is:
and here are some more errors
Prog7.java:13: error: cannot find symbol
x.printAsDouble();
^
symbol: method printAsDouble()
location: variable x of type Fraction
Prog7.java:18: error: cannot find symbol
x.printAsDouble();
^
symbol: method printAsDouble()
location: variable x of type Fraction
Prog7.java:21: error: cannot find symbol
x.printAsDouble();
^
symbol: method printAsDouble()
location: variable x of type Fraction
3 errors