Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implementing a Superclass Bank Account Part 1 : Implement a superclass BankAccount that has the following fields and methods. Fields: string firstName string lastName int

Implementing a Superclass Bank Account

Part 1: 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 2: Implement a CheckingAccount class that inherits from the BankAccount class, that:

Has an interest rate attribute

Allows overdraft withdrawals and charges a $30 fee

Methods:

processWithdrawal() - will display a negative balance that includes a $30 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.

Submit screenshots of your program's execution and output. Include all appropriate source code in a zip file.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is the cerebrum?

Answered: 1 week ago

Question

4. Explain how to price managerial and professional jobs.pg 87

Answered: 1 week ago