+ 1
Please write the programm
Write a class BankAccount, which should provide following facilities : (1) opening bank account (2) check balance but it should ask user to enter five digit password (3) To deposit the balance (4) To withdraw the balance.
14 Answers
+ 3
Well, that's difficult, hiding part of the screen, maybe just clear the screen and print the balance information?
Add code here? are you on SoloLearn mobile or website? I'm on mobile, I create code in Code Playground by going to my account (the button next to notification counter) then select the Code section, there's a green button with + mark, click on it
+ 3
Bro, I think you misunderstood about balance, deposit and withdraw.
Balance : current amount of money in bank
Deposit : amount of money to add to bank
Withdraw : amount of money to take from bank
Deposit increase balance, withdraw decrease balance, so it's like:
Enter money to deposit in...
balance+=deposit
Enter money to withdraw from...
balance-=withdraw
+ 2
@Arif Ali, instead of telling people to write you a program, try to do it first, then if you have problem come here to ask for a solution. That will show that you earn the favor, and a good intention.
+ 2
@Arif Ali, good code, can you tell me the C++ IDE on mobile you're using?
About password masking, I did a little search, but haven't tried anything. Most of the articles I read says the solution is O/S dependant. If you're interested, you can read about it:
http://www.cplusplus.com/articles/E6vU7k9E/
https://stackoverflow.com/questions/29810055/show-while-i-input-hide-mask-input
http://www.cplusplus.com/forum/general/3570/
+ 2
Ok, bro please remember, to remove "Best Answer" mark, and make original question title more attractive, I hope more people can help you bro...
0
waiting !!! for responce plz send code
0
thanks ... I tried but it's hard difficult for me .. there are a lot of errors in my programm ... I'll show you later my source file ... in comment
0
//this is made by me it's working ok but I need something different like when I enter password the account detail will be hide and program just show the balance which is available in it and there we can deposit are withdraw... do you understanding what I want to say... this is my simple account program it will work perfectly in my C++ IDE compiler in my mobile...
#include <iostream>
using namespace std;
class account{
private:
string name;
string f_name;
int account_num;
int balance;
int deposit;
int withdraw;
public:
void setdata (string name, string f_name, int ac, int balance, int deposit, int widraw){
name=name;
account_num=ac;
balance =balance;
deposit=deposit;
withdraw=widraw;
cout<<"\tACCOUNT INFORMATION\n";
cout<<endl<<endl;
cout<<"Name \t\t:\t";
cout<<name<<endl;
cout<<endl;
cout<<"Father's name\t:\t";
cout<<f_name<<endl;
cout<<endl;
cout<<"Account #\t:\t";
cout<<account_num<<endl;
cout<<endl;
cout<<"\tEnter password of 6 digit\n \tFor Balance Information\n";
string a;
cin>>a;
if(a=="******"){
cout<<"Account Balance\t:\t";
cout<<balance<<endl<<endl;
cout<<"Enter Money to deposit in your account balance\n";
cin>>deposit;
deposit=deposit+balance;
cout<<"Money is Deposited in your Account Balance\n";
cout<<"Account Balance\t:\t";
cout<<deposit;
cout<<endl;
cout<<endl;
cout<<"Enter Money to withdraw from your account balance\n";
cin>>withdraw;
withdraw=deposit-withdraw;
cout<<"Money is Withdrawn from your Account Balance\n";
cout<<withdraw;
}
}
};
int main(){
account obj;
obj.setdata("Arif Ali","Gul Hassan", 56577864, 3000, 65, 54);
}
0
and one morething when I enter passward my passward show like star but actually that will number or characters ... how's it possible can anyone suggest me...
0
no solution of my subject...
I meant when I enter passward the account information have to hide and just balance information can appear ...
bro I am using C++ IDE compiler in my mobile
0
how to add program here... I don't know how to write program in compiler here .. that others are coding...
0
I can understand bro....
but It was not working when do like that
0
bro i have many ways for this program ... I just upload an example ....
thanks for responcing.... ok by
0
ok....