Question: Description: Write a complete program which uses a class called Account to write a banking program that maintains an account balance and provides for deposit

 Description: Write a complete program which uses a class called Accountto write a banking program that maintains an account balance and provides

Description: Write a complete program which uses a class called Account to write a banking program that maintains an account balance and provides for deposit and withdrawal transactions for a noninterest - bearing account. Create a class called Account to write a banking program that maintains an account balance and provides for deposit and withdrawal transactions for a noninterest - bearing account. The program is to use keyboard entry for both the transaction type and for the amount. The program input, process and output is outlined below. Program Input Your program is to accept the following user inputs: (1) Transaction type: d for deposit w for withdrawal (2) Amount of transaction Program Process Your program is to compute / process the following items: (1) The account balance (2) Add a deposit (3) Subtract a withdrawal (4) Display message if transaction is invalid Program Output Your program is to output each of the following: (1) the transaction description (2) the transaction amount (3) the account balance Program Planning Your program is to utilize the following variables and their associated data types: Properties Data Type Name Amount of Transaction float fAmount Transaction Type char cType Transaction Description char array stDescription Account Balance float fBalance Your program is to utilize the following functions (methods ) and their respective purposes: Method Purpose Class Constructor To initialize the account balance through user input) Run() To control program execution (call other functions) ObtainData() To prompt and input transaction type and amount Calculate() To calculate account balance after new transaction PrintReport) To generate a formatted report Use the following start code for the Account class function Calculate(). When using the strcpy_s() function, as in the case of function Calculate(), remember to include the preprocessor directive #include . Note- if strcpy_s() function is not working with your compiler version, feel free to use strcpy() as a function or a string type to store stDescription data values. // code for the Account class function Calculate() if (cType 'd' || cType == 'D') { strcpy_s(stDescription, "Deposit"); fBalance += fAmount; } else if (cType == 'W' || cType == 'W') { strcpy_s (stDescription, "Withdrawal"); fBalance -- fAmount; } else { strcpy_s(stDescription, "Invalid"); cout

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!