Question: IN C++ Design and implement a BankAccount program, to find the account balance for a month. Each bank account has a number and holds the

IN C++

Design and implement a BankAccount program, to find the account balance for a month. Each bank account has a number and holds the initial balance, amount of deposits, amount of withdrawals, annual interest rate, and a monthly service charges. The final balance for an account consists of whatever the original balance is, plus the interest earned by the account. The final balance can be found using the following equations:

Monthly Interest Rate = (Annual Interest Rate / 12) Monthly Interest = (Initial Balance + Deposits Withdrawals) * Monthly Interest Final Balance = Initial Balance + Deposits - Withdrawals + Monthly Interest - Monthly Services Charges

Write a complete program that reads the account number, the initial balance, the monthly service charges, and the monthly transactions for an account from a file and calculates the following:

The total number of deposit transactions The total amount of deposits The total number of withdrawal transactions The total amount of withdrawals

The ending balance. The data file format is as follows:

# amount //account number b amount //the initial balance i amount //annual interest rate c amount //monthly service charge d amount //deposit operation

w amount //withdraw operation ...

When the program runs, it should prompt the user for a data filename, and display all the information of an account on the screen.

Create a BankAccount class, and use an object of that class to read the data file, and find all the required information about that account. In this class create a constructor, destructor, getters and setters to all variables.

Keep your driver class (where the main() is) clean, this means your main() function should only have function calls through the BankAccount object, and no data file processing.

Download the provided sample data file and use it to test your implementation.

example.txt contains:

# 123456 b 100.0 i 0.01 c 5.00 d 10.0 w 2.0 d 5.0 d 7.1 w 3.3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!