Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java inheritance exercise Pursose: This exercise allows you to implement inheritance and polymorphism. Description Write a bank a Bank Account project according to the following

Java inheritance exercise Pursose: This exercise allows you to implement inheritance and polymorphism. Description Write a bank a Bank Account project according to the following specifications: Bank Account: Every bank account has an identifier, a PIN, and a balance. Every bank account should have a way to deposit an amount, withdraw an amount(abstract method), and display the current balance. Ensure that any class that inherits from this class has a withdraw() method that overrides the abstract withdraw() method. Savings: The withdraw method will only let the owner withdraw if the funds are sufficient. If the owner attempts to withdraw an amount higher than the balance, print an error message and do not process the withdraw. Checking: The withdraw method should withdraw the amount only if the funds are availible, and apply a service fee of $0.25 for each withdrawal to the balance. If the owner. if the owner attempts to withdraw more than the balance of the account, print an error message and do not process the withdraw. CheckingPlus: The withdraw method will allow the owner to withdraw more than the balance up to a predefined limite(the limit is a field in the class, the numer I used was 1000) If the amount requested is approved the fee is applied. The fee is a percentage of the amount overdrawn(ex: 10%). If the limit is exceeded, throw and catch the error. Testing: In main() create an array of five BankAccounts objects and each account will have a unique ID. Then allow the user to enter the BankAccount ID and PIN to either deposit or withdraw an amount. After each transaction, display the current balance. if the account ID with the PIN number is wrong, print an error message to the user and ask for another ID and PIN.

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

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

Students also viewed these Databases questions

Question

Which personal relationships influenced you the most?

Answered: 1 week ago

Question

What were your most important educational experiences?

Answered: 1 week ago