posted 17 years ago
When i compile my piece of code i get the following errors -
C:\jexp>javac banktest.java
banktest.java:182: cannot find symbol
symbol : method getType()
location: class BankAccount
if(getType())
^
banktest.java:184: cannot find symbol
symbol : method getAmount()
location: class BankAccount
return currentBalance - getAmount();
^
banktest.java:190: cannot find symbol
symbol : method getType()
location: class BankAccount
if(!getType())
^
banktest.java:192: cannot find symbol
symbol : method getAmount()
location: class BankAccount
return currentBalance + getAmount();
^
banktest.java:192: operator + cannot be applied to double,getAmount
return currentBalance + getAmount();
^
banktest.java:192: incompatible types
found : <nulltype>
required: double
return currentBalance + getAmount();
^
banktest.java:207: cannot find symbol
symbol : method readDate()
location: class Transaction
list[i].readDate();
^
7 errors
Here is the code -
How can i fix these errors? Thanks.