Question: Part 1 : Implement a superclass BankAccount that has the following fields and methods. Fields: string firstName string lastName int accountID double balance Methods: constructor
Part : Implement a superclass BankAccount that has the following fields and methods.
Fields:
string firstName
string lastName
int accountID
double balance
Methods:
constructor: initialize balance to zero
deposit will accept a single value double parameter; the parameter value is added to the existing balance
withdrawal accepts a single value double dollar amount; the parameter value is subtracted from the existing balance
Setters and getters for firstName, lastName, and accountID
getBalance getter to return the balance
accountSummary prints all account information
Part : Implement a CheckingAccount class that inherits from the BankAccount class, that:
Has an interest rate attribute
Allows overdraft withdrawals and charges a $ fee
Methods:
processWithdrawal will display a negative balance that includes a $ overdraft fee and denotes that a fee has been accessed
displayAccount should display all superclass attributes and provides an additional interest rate
Ensure that your program has the two required classes and a test class.
Place each Java class into a separate Java source file.N
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
