-
Notifications
You must be signed in to change notification settings - Fork 0
/
account.cpp
49 lines (42 loc) · 1.1 KB
/
account.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "account.h"
void account::create_account() {
cout<<"\nEnter The account No. :";
cin>>l.Number;
cout<<"\n\nEnter The Name of The account Holder : ";
cin.ignore();
cin.getline(l.name,50);
cout << "\n\nEnter password : ";
cin.getline(l.Password,12);
cout<<"\nEnter The Initial amount : ";
cin>>deposit;
cout<<"\n\n\nAccount Created..";
}
void account::show_account() const {
cout<<"\nAccount No. : "<<l.Number;
cout<<"\nAccount Holder Name : ";
cout<<l.name;
cout<<"\nBalance amount : "<<deposit;
}
void account::modify() {
cout<<"\nAccount No. : "<<l.Number;
cout<<"\nModify Account Holder Name : ";
cin.ignore();
cin.getline(l.name,50);
cout << "\n\nEnter password : ";
cin.ignore();
cin.getline(l.Password,12);
cout<<"\nModify Balance amount : ";
cin>>deposit;
}
void account::dep(int x) {
deposit+=x;
}
void account::draw(int x) {
deposit-=x;
}
void account::report() const {
cout<<l.Number<<setw(10)<<" "<<l.name<< " " << setw(6)<<deposit<<endl;
}
int account::GetDeposite() const {
return deposit;
}