Question: Please write in c + + ( preferably using Replit ) . Also please include using namespace std; . Thank you. You will write
Please write in cpreferably using Replit Also please include "using namespace std; Thank you.
You will write a program that will help in the management of a private bank.
General Requirements
Write a program that reads each time the program is executed from the secondary storage from a file named accounts.txt the account numbers and balances into a onedimensional array of Objects of type Account
Your program will ask the user to choose one of the following options:
Deposit Money
Withdraw Money
Transfer Money
Show Transactions
Quit Program
The program will have at least one class: Account
The program will have a structure named Date, which has three members day month, and Year
The class Account will have at least six private members Person owner, int acctNo, double balance, a variable named openDate of type date, a variable named closeDate of type date, bool closed
The class Account will also have at least five public member functions:
constructor that receives two strings and four integers to initialize all instance variable of the owner as well as a double to initialize the balance and four integers to initialize the acctNo and the openDate. The constructor will initialize the bool closed to false.
print function to print the owners information and the account information account Number, Balance, and Open Date
deposit function that receives one parameter of type double
withdraw function that receives one parameter of type double
transfer function that receives two parameter: one parameter of type double and the one parameter of type Account
one userdefined functions to print the options menu.
If the user tries to withdraw more than the available balance an error message will be displayed and the transaction will not be processed.
Closing an account will only flag the account rather than permanently delete the account and update the closeDate.
If the user tries to close a nonzero balance account an error message will be displayed and the transaction will not be processed.
When the user decides to quit the new balances are saved back to the secondary storage to the same file ie accounts.txt
The functions name is printOptionsMenu, which will print show on the screen
Please choose one of the following options:
Deposit Money
Withdraw Money
Transfer Money
Open an Account
Close an Account
Quit Program
Declare and array of type Account in the main function and use a constant TOTALCAPACITY to set the size of the array.
Declare an int variable actualnumberofaccounts that will be used to indicate how many actual accounts are stored in the array.
Make sure to follow the instructions carefully including using the exact function names with the exact letter cases upper and lower case letters Your programs are going to be tested using a unified main function that is developed for that purpose. If the unified main function does not compile this indicates inconsistencies in meeting the above requirements and will result in a zero grade.
All functions except the main function will be defined as follows:
The function prototype appears before the main
Comment describing what the function does appears directly under function prototype
Formal variable names are not used in any prototype
The functions definition appears after the main
Additional Requirements:
Be sure to comment your code adequately.
Be sure to indent properly. Check the textbook to see how it should be done.
Use selfdocumenting variable names
Additional Requirements:
Be sure to comment your code adequately.
Be sure to indent properly. Check the textbook to see how it should be done.
Use selfdocumenting variable names
Sample contents of the accounts.txt file:
tableSerialAccount,FirstName,LastName,Balance,Flag,Richard,Dustin,Michael,Smith,George,Gonzales,Donald,Malik,Owen,Evelyn,
Additional Requirements:
Be sure to comment your code adequately.
Be sure to indent properly. Check the textbook to see how it should be done.
Use selfdocumenting variable names
Sample contents of the accounts.txt file:
tableSerialAccount,FirstName,LastName,Balance,FlagRichard,Dustin,Michael,Smith,George,Gonzales,Donald,Malik,Owen,Evelyn,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
