Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A) Using the class BankAccount' defined in the assignment 2, modify it according to the fall 1. Remove data member Bank Account Type (Current Account,
A) Using the class BankAccount' defined in the assignment 2, modify it according to the fall 1. Remove data member "Bank Account Type (Current Account, Savings Account)" from kAccount dass. 2. Modify the parameterized constructor to take balance as argument. 3. Add copy contractor. B) Create an inheritance hierarchy where "BankAccount" is the base class and "SavingAcco d "Current Account" are derived classes. With the SavingAccount, the Bank pays interest Year to the customer based on the account balance. With the CurrentAccount the Bank s1 JD as charges for each withdraw transaction. 1. Initialise a SavingAccount and Current Account objects with an initial balance 100JD 2. Write the code of 'CalculateInterest' function for the SavingAccount class. It should ca he interest yearly and add it to the balance 3. Write the code of Transaction Charge function for the CurrentAccount class. It should 1 JD from the balance after each withdraws transaction. 4. Create a "FlexyAccount" class that drived from SavingAccount and Current Account. 5. create 'CalculateInterest' function for the FlexyAccount class, knowing that the interes 1% 6 create Transaction Charge function for the FlexyAccount class, knowing that the chan ach withdraw transaction is 0.5 JD. 7 Write the appropriate code for the destructor of each derived class. 8. Write the code of 'PrintBank function for each derived class. A) Using the class BankAccount' defined in the assignment 2, modify it according to the fall 1. Remove data member "Bank Account Type (Current Account, Savings Account)" from kAccount dass. 2. Modify the parameterized constructor to take balance as argument. 3. Add copy contractor. B) Create an inheritance hierarchy where "BankAccount" is the base class and "SavingAcco d "Current Account" are derived classes. With the SavingAccount, the Bank pays interest Year to the customer based on the account balance. With the CurrentAccount the Bank s1 JD as charges for each withdraw transaction. 1. Initialise a SavingAccount and Current Account objects with an initial balance 100JD 2. Write the code of 'CalculateInterest' function for the SavingAccount class. It should ca he interest yearly and add it to the balance 3. Write the code of Transaction Charge function for the CurrentAccount class. It should 1 JD from the balance after each withdraws transaction. 4. Create a "FlexyAccount" class that drived from SavingAccount and Current Account. 5. create 'CalculateInterest' function for the FlexyAccount class, knowing that the interes 1% 6 create Transaction Charge function for the FlexyAccount class, knowing that the chan ach withdraw transaction is 0.5 JD. 7 Write the appropriate code for the destructor of each derived class. 8. Write the code of 'PrintBank function for each derived class
Step by Step Solution
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