Ranjit

18 September, 2009

BANK SIMPLE PROGRAMM...

Class name BANK,Data members: Account no, Depositer name, Balance Amount .
Member Function: To assign values( Use Constructor),to deposit amount, To display information…
#include"iostream.h"
#include"conio.h"
#include"string.h"
class BANK
{
private:int ac_no;char *depositor_name;float balence_amt;
public:BANK(int A,char *B,float C)
{ ac_no = A;
strcpy(depositor_name,B);
balence_amt = C;
}
BANK()
{ ac_no = 0;
strcpy(depositor_name,"");
balence_amt = 0;
}
void show();
void deposit(float D)
{balence_amt = balence_amt + D;}
};

No comments:

Post a Comment