Question: It keeps giving me these errors Main.java C . 'BankAccount ( java . lang.String, double ) ' in 'BankAccount' cannot be applied to ' (
It keeps giving me these errors
Main.java
C
'BankAccountjavalang.String, double in 'BankAccount' cannot be applied to int double :
'BankAccountjavalang.String, double in 'BankAccount' cannot be applied to int double :
'SavingsAccountint double, double in 'SavingsAccount' cannot be applied to javalang.String, double, double :
'CheckingAccountint double, double in 'CheckingAccount' cannot be applied to javalang.String, double, double :
A Field 'interestRate' may be 'final' :
Field 'overdraftLimit' may be 'final' :
prop The word 'withdraw' is not a noun. Did you mean withdrawal? :
The word 'withdraw' is not a noun. Did you mean withdrawal? : Instructions
Abstract Class BankAccount
Fields: accountNumber, balance
Constructor: Initializes accountNumber and
Abstract Methods:
void depositdouble amount : Adds to the balance.
void withdrawdouble amount : Deducts from the balance if there are sufficient funds.
Concrete Method:
double getBalance: Returns the current balance.
Derived Classes
SavingsAccount:
Field: interestRate.
Method applyInterest : Adds interest to the balance.
Overrides the deposit and withdraw methods based on specific rules eg minimum balance
CheckingAccount:
Field: overdraftLimit.
Overrides withdraw to allow overdrafts up to a limit
Main Class
Create a main class to:
Instantiate both
and
Perform deposit and withdraw operations.
Display the account balance.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
