Question
The customer of the bank is allowed to open a new account of savings and current account. Both type of accounts permitted the following transactions:
The customer of the bank is allowed to open a new account of savings and current account.
Both type of accounts permitted the following transactions:
Checking balance
Deposits money
Withdraw money
The savings account earns interest on the money they hold. It supposes to update the balance
by calculating the monthly interest earned by the account and adding the interest to the
balance. Following are the formulas:
Monthly interest rate = Annual interest rate / 12
Monthly interest = Balance * Monthly interest rate
Balance = Balance + Monthly interest
The current account allowed to make purchases by using debit card, credit card, checks,
or account information. These accounts also have overdraft amount fees. In exchange for
an overdraft fee, bank covers a transaction that exceeds the money in checking account.
The bank may offer overdraft protection, which customers can decide whether to opt-in for.
INSTRUCTIONS
A. Inheritance concept:
Write a complete program to construct an inheritance hierarchy for the customer
bank account, and to derive the savings and current account.
Following are the attributes for each type of account:
o Customer bank account has a data member to represent the account balance.
o Saving account has a data member to represent the interest rate
o Checking account has a data member to represent an overdraft
The saving account shall have an additional member to represent a boolean of status as active or inactive.
B. Class concept:
Write a class to represent customer details, as follows:
o Customer name
o Customer contact number
C. Demo program:
The main() program shall provide a menu-driven program which able to ask users for:
o Type of user: saving or checking account
o Type of transaction (for each account type): check balance, withdraw or deposit
The program should be able to perform a series of transaction which keeps the program executing till the program stop.
Each class created shall have the following members:
o Mutator/set method
o Accessor/get method
o constructor
o toString (if needed)
o Specialization method (if needed) – additional behavior method
The program output shall be provided with relevant information needed as similar to
the bank information.
Step by Step Solution
3.39 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started