Document (7)

docx

School

CUNY Hunter College *

*We aren’t endorsed by this school

Course

23

Subject

Computer Science

Date

Nov 24, 2024

Type

docx

Pages

2

Uploaded by KidSquid1731

Report
Creating bank account using inheritance method My program is a banking management system created by java programming language, The program has to allow the creation of a new account containing account number, holder name, balance and roi. The program has to allow deposit and withdraw and ability to check current balance. Bank Account class is the top of the class hierarchy and will contain member data as follows: Bank Account.java Class Data Members An account number An account holder name An account balance In addition to that I created a new kind of Bank Account using inheritance by extension because Without inheritance, I would have to write it from scratch, duplicating code, etc. The SavingAccount.java child class which is derived from the original Bank Account.java parent Class and thus inherits the parent class members and contains the new data as follows: Data Members An account number An account holder name An account balance A function that will debit the account for a withdrawal A function that will show the remaining account balance after a withdrawal. BankAccount SavingsAccount
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help