**C++ program** Mini Bank Account Management System: This system aimed to comput
ID: 3854021 • Letter: #
Question
**C++ program** Mini Bank Account Management System: This system aimed to computerize the bank account management operations such as open an account, withdraw money, deposit money etc. Modules: There are three main parts of the system:
1) Person, Student and Teacher objects, where Person needs to be declared as an abstract base class and Student & Teacher should be declared as derived class.
2) Bank Account containing the account holder
3) Bank transactions such as open an account, withdraw and deposit money
Main Menu: Main Manu consists of the following items:
1) Main Menu
2) Administrator Menu
3) Open Account
4) Close Account
5) Withdraw Money
6) Deposit Money
7) Display Account holder with maximum deposit
8) Exit
If user choose the Administrator menu then system will display another submenu, which will show the following submenu options:
1) Create Student Record
2) Display All Student Records
3) Display All Students by Last Name
4) Display Specific Student Record
5) Modify Student Record
6) Delete Student Record
7) Create Teacher Record
8) Display All Teacher Records
9) Display Specific Teacher Record
10) Modify Teacher Record
11) Delete Teacher Record
12) Return to Main Menu
Data storage: data can be stored in a text file. Therefore, you must use the file read and write operations for data retrieval and storage. For this system, three files required: Student.txt, Teacher.txt and Bank Account.txt.
N.B: The above requirements can be considered as a guideline for this project. You can provide more functionalities for the proposed system. However, the above features must be present to achieve full credits from this Term Project. All inputs must be considered and displayed a proper error message. You can create a simple console based project with the above menu, where the system will prompt the user to enter the corresponding number from the keyboard to execute an operation. e.g. user needs to enter 3 for opening a bank account, and make sure to include exception handling, sorting.
Explanation / Answer
#include <iostream.h>
#include <conio.h>
class account { char cust_name[20];
int acc_no;
char acc_type[20];
public:
void get_accinfo()
{
cout<<" Enter Customer Name :- ";
cin>>cust_name;
cout<<"Enter Account Number :- ";
cin>>acc_no;
cout<<"Enter Account Type :- ";
cin>>acc_type;
}
void display_accinfo()
{
cout<<" Customer Name :- "<<cust_name;
cout<<" Account Number :- "<<acc_no;
cout<<" Account Type :- "<<acc_type;
}
};
public account
{
staticfloat balance;
public:
void disp_currbal()
{
cout<<" Balance :- "<<balance;
}
void deposit_currbal()
{
float deposit;
cout<<" Enter amount to Deposit :- ";
cin>>deposit;
balance = balance + deposit;
}
void withdraw_currbal()
{
float penalty,withdraw;
cout<<" Balance :- "<<balance;
cout<<" Enter amount to be withdraw :-";
cin>>withdraw;
balance=balance-withdraw;
if(balance < 300)
{
penalty=(500-balance)/10;
balance=balance-penalty;
cout<<" Balance after deducting penalty : "<<balance;
}
elseif(withdraw > balance)
{
cout<<" You have to take permission for Bank Overdraft Facility ";
balance=balance+withdraw;
}
else cout<<" After Withdrawl your Balance revels : "<<balance;
}
};
public account {
staticfloat savbal;
public:
void disp_savbal()
{
cout<<" Balance :- "<<savbal;
}
void deposit_savbal()
{
float deposit,interest;
cout<<" Enter amount to Deposit :- ";
cin>>deposit;
savbal = savbal + deposit;
interest=(savbal*2)/100;
savbal=savbal+interest;
}
void withdraw_savbal() {
float withdraw; cout<<" Balance :- "<<savbal;
cout<<" Enter amount to be withdraw :-";
cin>>withdraw;
savbal=savbal-withdraw;
if(withdraw > savbal) {
cout<<" You have to take permission for Bank Overdraft Facility ";
savbal=savbal+withdraw;
}
else cout<<" After Withdrawl your Balance revels : "<<savbal;
}
}; float cur_acct :: balance; float sav_acct :: savbal;
void main() {
clrscr();
cur_acct c1;
sav_acct s1;
cout<<" Enter S for saving customer and C for current a/c customer ";
char type; cin>>type; int choice;
if(type=='s' || type=='S') {
s1.get_accinfo();
while(1) {
clrscr(); cout<<" Choose Your Choice ";
cout<<"1) Deposit ";
cout<<"2) Withdraw ";
cout<<"3) Display Balance ";
cout<<"4) Display with full Details ";
cout<<"5) Exit ";
cout<<"6) Choose Your choice:-";
cin>>choice; switch(choice) {
case 1 : s1.deposit_savbal();
getch();
break;
case 2 : s1.withdraw_savbal();
getch();
break;
case 3 : s1.disp_savbal
getch();
break;
case 4 : s1.display_accinfo();
s1.disp_savbal();
getch();
break;
case 5 : goto end;
default: cout<<" Entered choice is invalid,"TRY AGAIN""; }
}
} else {
{ c1.get_accinfo();
while(1) {
cout<<" Choose Your Choice ";
cout<<"1) Deposit ";
cout<<"2) Withdraw ";
cout<<"3) Display Balance ";
cout<<"4) Display with full Details ";
cout<<"5) Exit ";
cout<<"6) Choose Your choice:-";
cin>>choice; switch(choice) {
case 1 : c1.deposit_currbal();
getch();
break;
case 2 : c1.withdraw_currbal();
getch();
break;
case 3 : c1.disp_currbal();
getch();
break;
case 4 : c1.display_accinfo();
c1.disp_currbal();
getch();'
break;
case 5 : goto end; default: cout<<" Entered choice is invalid,"TRY AGAIN"";
}
}
}
end:
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.