Sei sulla pagina 1di 13

Term

Paper
CSE-202

Banking System

Submitted to: Submitted by:

MR. DINESH KUMAR Pulkit Manchanda

RB1801A01

Reg. No. 10802999

Pu|k!t Manchanda
RB1801A01
Acknowledgement

I take this opportunity to express my gratitude to our


guide Lect. Dinesh Kumar who encouraged me with her
critical and constructive suggestions in the project work.
I am also thankful to my FRIENDS for their
invaluable guidance in this project. They benefited me
with their experience and skills in the project.
I again thank all the people who helped me in my
project for their support and encouragement.

Pu|k!t Manchanda
RB1801A01
Introduction
The program is based on the idea how the banking is
carried in a normal bank.
• It includes the creating of an account
• Withdrawing the money
• Depositing the money
• Deleting an account.
• Displaying information of an account

The working of the software/project is user friendly. It


explains everything to the user and then asks for the input.
And accordingly works as the user inputs.

Pu|k!t Manchanda
RB1801A01
Features used in the program

• Classes
• Objects
• Access Specifies(Private/Public)
• Data member functions
• Member Functions
• Encapsulation

Pu|k!t Manchanda
RB1801A01
Source Code
#include<iostream.h>
#include<iomanip.h>
#include<conio.h>

class bank
{
char custname[20];
long int accnum;
float balance;

public:
int flag;
void create(long int);
void withdrawl(void);
void deposit(void);
void del(void);
void display(void);
void displayall(void);
};

void bank::create(long int i)


{
if(flag==0)
{
accnum=i;
cout<<endl<<"Enter customer name : ";
Pu|k!t Manchanda
RB1801A01
cin>>custname;
cout<<endl<<"Enter initial amount : ";
cin>>balance;
flag=1;
cout<<endl<<"Account successfully created!";
}
else
cout<<"\nCan't create the account! Already exists...";
}

void bank::withdrawl(void)
{
if(flag==1)
{
float temp;
cout<<endl<<"Enter amount you want to withdraw :- ";
cin>>temp;
if(temp>balance)
cout<<endl<<"The amount in your account is less than the
amount you want to withdraw";
else
{
balance=balance-temp;
cout<<endl<<"Successfully withdrawned! Balance is
"<<balance;
}
}
else
cout<<endl<<"The account not present! can't withdraw...";
}

Pu|k!t Manchanda
RB1801A01
void bank::deposit(void)
{
if(flag==1)
{
float temp;
cout<<endl<<"Enter amount you want to deposit : ";
cin>>temp;
balance=balance+temp;
cout<<endl<<"Successfully deposited. Balance is
"<<balance;
}
else
cout<<endl<<"The account not present! can't withdraw...";
}

void bank::del(void)
{
if(flag==1)
{
flag=0;
cout<<endl<<"The account is successfully deleted.";
}
else
cout<<endl<<"The account not present! Can't delete...";
}

void bank::display(void)
{
if(flag==1)
{
Pu|k!t Manchanda
RB1801A01
cout<<setw(8)<<"Acc.Num"<<setw(20)<<"Customer
name"<<setw(10)<<"Balance";
cout<<endl<<setw(8)<<accnum<<setw(20)<<custname<<se
tw(10)<<balance;
}
else
cout<<"\nThe account not present! Can't display";
}

void bank::displayall()
{
if(flag==1)
cout<<endl<<setw(8)<<accnum<<setw(20)<<custname<<set
w(10)<<balance;
}

int main()
{
int ch;
long int i=0;
bank b[100];
for(int j=0;j<100;j++)
{
b[j].flag=0;
}
do
{
cout<<"\n\n\n\t\t\4\4\4\4\4Welcome to Lovely
Bank\4\4\4\4\4";
Pu|k!t Manchanda
RB1801A01
cout<<"\nWhich operation do you want to
perform..."<<endl<<endl;
cout<<"1.Create a bank account."<<endl;
cout<<"2.Withdraw a money."<<endl;
cout<<"3.Deposit a money."<<endl;
cout<<"4.Delete an account."<<endl;
cout<<"5.Display an account."<<endl;
cout<<"6.Display all the account."<<endl;
cout<<"7.Exit"<<endl;
cout<<"Enter your choice :- ";
cin>>ch;
switch(ch)
{
case 1:
cout<<endl<<"Enter your account number : ";
cin>>i;
b[i].create(i);
break;

case 2:
cout<<endl<<"Enter your account number : ";
cin>>i;
b[i].withdrawl();
break;

case 3:
cout<<endl<<"Enter your account number : ";
cin>>i;
b[i].deposit();
break;

Pu|k!t Manchanda
RB1801A01
case 4:
cout<<endl<<"Enter your account number : ";
cin>>i;
b[i].del();
break;

case 5:
cout<<endl<<"Enter your account number : ";
cin>>i;
b[i].display();
break;

case 6:
cout<<setw(8)<<"Acc.Num"<<setw(20)<<"Customer
name"<<setw(10)<<"Balance"<<endl;
cout<<"---------------------------------------------------------------
---------------";
for(i=0;i<100;i++)
b[i].displayall();
break;

default:
cout<<"Invalid choice! Please try again...";
break;

case 7:
cout<<endl<<"Thanks for using the Lovely Bank!";
break;
}
getch();
}while(ch!=7);
Pu|k!t Manchanda
RB1801A01
return 0;
}

Pu|k!t Manchanda
RB1801A01
Hardware Requirements
• Operating system - windows 98/ xp/me/2000/ linux

• Ram – 128mb (minimum)

• Processor – Pentium III 1.4 ghz(minimum)

Pu|k!t Manchanda
RB1801A01
Bibliography
• www.1000projects.com
• www.wikipaedia.com
• www.Sourcecodeforc.com
• www.punjaabimunda.hi5.com
• www.myproject.com

Pu|k!t Manchanda
RB1801A01

Potrebbero piacerti anche