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.
'BankAccount(java.lang.String, double)' in 'BankAccount' cannot be applied to '(int, double)' : 28
'BankAccount(java.lang.String, double)' in 'BankAccount' cannot be applied to '(int, double)' :64
'SavingsAccount(int, double, double)' in 'SavingsAccount' cannot be applied to '(java.lang.String, double, double)' :93
'CheckingAccount(int, double, double)' in 'CheckingAccount' cannot be applied to '(java.lang.String, double, double)' :94
A. Field 'interestRate' may be 'final' :24
Field 'overdraftLimit' may be 'final' :60
prop The word 'withdraw' is not a noun. Did you mean withdrawal? :48
The word 'withdraw' is not a noun. Did you mean withdrawal? :79 Instructions
1. Abstract Class - BankAccount
- Fields: accountNumber, balance .
- Constructor: Initializes accountNumber and
- Abstract Methods:
- void deposit(double amount) : Adds to the balance.
- void withdraw(double amount) : Deducts from the balance if there are sufficient funds.
- Concrete Method:
- double getBalance(): Returns the current balance.
2. Derived Classes
- SavingsAccount:
- Field: interestRate.
- Method applyInterest() : Adds interest to the balance.
- Overrides the deposit and withdraw methods based on specific rules (e.g., minimum balance).
- CheckingAccount:
- Field: overdraftLimit.
- Overrides withdraw to allow overdrafts up to a limit.
3. Main Class
- Create a main class to:
- Instantiate both
and
- Perform deposit and withdraw operations.
- Display the account balance.
It keeps giving me these errors Main.java C .

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 Programming Questions!