wangnanjing
January 23rd, 2003, 11:37 AM
Hello All,
I am a Java beginner, I met those problems:
1. I changed the name of the method multiply to multiply1
in the interface ICalc,when i compile the Calculaor.java,
error occured:
---------------------------------------------------------------------------------
edu\wpi\cs\cs509\calculator\Calculator.java:11: edu
ulator should be declared abstract; it does not def
wpi.cs.cs509.calculator.Calculator
public class Calculator implements IBlock, ICalc {
^
1 error
-----------------------------------------------------------------------------------
when I add "abstract" before class Calculator implements IBlock, ICalc
it worked.why????
2. I added a new method named add(int a,int b) in the interface ICacl
then i compiled another component which has used the ICal interface,
such error occured:
edu\wpi\cs\cs509\tutorial\FirstTry.java:146: cannot resolve symbol
symbol : method add_number (int,int)
location: interface edu.wpi.cs.cs509.calculator.ICalc
int res = ourCalculator.add(i2, i3);
could you tell me how to resolve this problem/
thanks a lot.
I am a Java beginner, I met those problems:
1. I changed the name of the method multiply to multiply1
in the interface ICalc,when i compile the Calculaor.java,
error occured:
---------------------------------------------------------------------------------
edu\wpi\cs\cs509\calculator\Calculator.java:11: edu
ulator should be declared abstract; it does not def
wpi.cs.cs509.calculator.Calculator
public class Calculator implements IBlock, ICalc {
^
1 error
-----------------------------------------------------------------------------------
when I add "abstract" before class Calculator implements IBlock, ICalc
it worked.why????
2. I added a new method named add(int a,int b) in the interface ICacl
then i compiled another component which has used the ICal interface,
such error occured:
edu\wpi\cs\cs509\tutorial\FirstTry.java:146: cannot resolve symbol
symbol : method add_number (int,int)
location: interface edu.wpi.cs.cs509.calculator.ICalc
int res = ourCalculator.add(i2, i3);
could you tell me how to resolve this problem/
thanks a lot.