You are on page 1of 39

C++ PROJECT

BANKING SYSTEM

ACKNOWLEDGEMENT
We are highly privileged to Present this project on BANKING SYSTEM. We thank God Almighty for his blessings. We take this opportunity to thank all those who helped us, especially our dear principal Rev. Fr.Scaria Ethirett and also our beloved teacher Mrs.Brighty Varghese for her kind

guidance. We also thank our friends for their help Thanking you:..

DECLARATION
I hereby declare that this project work entitled BANKING SYSTEM rebuilt in partial fulfillment of the

study of class XII under the syllabus scheme of CBSE NEW DELHI in computer science is a record of the bonafide research carried out by me under the guidance of my teacher Mrs. Brigthy Varghese and no part has been subjected for further studies.

Submitted by: .

iNDEX

C++ Overview System Requirements Introduction Modules Used

Flowchart Source Code Output Conclusion Bibliography

C++ Overview
The C++ programming was developed at AT&T Bell laboratories in the early 1980s by Bjarne Stroustup.He found 'C' lacking for simulations and decided to extend the language by adding features from his favourite language, Simula 67.Simula 67 was one of the earliest object oriented language.The name C++ was coined by Rick Mascitti where "++" is the C increment operator. The latest C++ standards

documents was issued by ANSI/ISO inyear 2003.The major reason behind the success and popularity of C++ is that it

supports the object oriented technology , the latest in the software development and the most near to the real world.

OOP PROGRAMMING
The object oriented approach views a problem in terms of objects involved rather than procedure for doing it. Object is an identifiable entity with some characteristics and behaviour. Object oriented programming is a method of implementation in with programs are organized as cooperative collections of objects , each of which represents an instance of some class , and whose classes are all members of a hierarchy of classes united via inheritance relationship.

OOP TERMINOLOGY AND FEATURES


The OOP approach is based on certain concepts that help it attain its goal of overcoming the drawbacks or shortcoming of conventional programming approaches. The general concepts of OOP are given below: 1.Data Abstraction 2.Data Encapsulation

3.Modularity 4.Inheritance 5.Polymorphism

1.Data Abstraction
Abstraction is the concept of simplifying a real world concept into its essential elements. It refers to the act of representing essential features without including the background details or explanations.

2.Data Encapsulation
Encapsulation is the most fundamental concept of OOP. It is the way of combining both data and the functions that operate on that data under a single unit. ie, the wrapping of data and functions into a single unit is known as encapsulation.

3.Modularity
The act of partitioning a program into individual components is called modularity . The justification for partioning a program is that (i) It reduces its complexity to some degree and (ii) It creates a number of well defined, documented boundaries within the program. Modularity is the property of a system that has been

decomposed into a set of cohesive and loosely coupled modules.

4.Inheritance
Inheritance is the capability of one class of thing to inherit capabilities or properties from another class. The class whose properties are inherited are, is called BASE CLASS or SUPER CLASS and the class that inherits these properties, is called DERIVED CLASS or SUB CLASS.

5.Polymorphism
Polymorphism is the ability for a message or data to be processed in more than one form. Polymorphism is a property by which the same massage can be sent to objects of several different classes

SYSTEM REQUIREMENTS
HARDWARE REQUIREMENT
o Processor:- Intel Pentium

o RAM :- 16 MB o Memory:- 45.2 MB

SOFTWARE REQUIREMENTS
o Operating System :- Windows 98/ XP, MS-DOS o Compiler :- Turbo C++ / Borland C++

INTRODUCTION
The name bank derives from the Italian word banco meaning desk/bench, used to make their transactions above a desk covered by a green tablecloth. However, there are traces of banking activity even in ancient times. In fact, the word traces its origin back to the Ancient Roman Empire, where moneylenders would set up their stalls in middle of enclosed courtyardscalled macella on a long bench called bancu, from

which the words banco and bank are ferived. As a moneychanger, the merchant at the bancu did not so much invest money, as merely convert foreign currency into the only legal tender in Rome-that of the Imperial Mint. The earliest evidence of money-changing activity is depicted on a silver drachm coin from ancient Hellenic colony Trapezes on the Black Sea, modern Trabzon, c.350-325 BC, presented in the British museum in London . the coin shows a bankers table (trapeza) laden with coins.

In fact, even today in Modern Greek the word Trapeza means both a table and a desk. Banks act as payment agents by conducting checking or current accounts for customers, paying cheques drawn by customers on the blank, and collecting cheques deposited to customers current accounts. Banks also enable customer payments via other payment methods such as telegraphic transfer, EFTPOS and ATM. Banks borrow money by accepting funds deposited on current accounts, by accepting term deposits and by issuing

debt securities such as banknotes and bonds. Banks lend money by making advances to customers on current accounts, by making advances to customers on current accounts, by making installment loans, and by investing in marketable debt securities and other forms of money lending. Banks provide almost all payment services and a bank account is considered indispensable by most businesses, individuals and governments. Non-banks that provide payment services such as remittance companies are not normally

considered an adequate substitute for having a bank account. Banks borrow most funds from households and non-financial businesses, and lend most funds to households and nonfinancial businesses, but non-bank lenders provide a significance and in many cases adequate substitute for bank loans, and money market funds , cash management trusts and other non-bank financial institutions in many cases provide an adequate substitute to banks for lending.

MODULES USED
This project is developed in C++ using class concepts and having number of different user defined function(UDFS).Some of them are as follows:
Write_account(

) This function is used to create an account. It contains account number, name, account type, initial amount.

deposit_withdraw( ) This function is used to deposit or withdraw some money from an account existing in the bank.

display_sp( ) This function is used to for balance enquiry i.e.,knowing the balance of an account existing in the bank.

display_all( ) This function is used to know the details of all the customers of the bank.

delete_account( ) This function is used to delete an existing account in the bank.

modify_account( ) This function is used to modify an existing account in the bank.

SOURCE CODE

//***************************************************************

// HEADER FILE USED IN PROGRAM //**************************************************************** #include<iostream.h> #include<conio.h> #include<stdio.h> #include<process.h> #include<fstream.h> #include<ctype.h> //*************************************************************** // CLASS USED IN PROGRAM //**************************************************************** class account { int acno; char name[50]; int deposit, withdraw; char type; public: void create_account() { cout<<"\nEnter The account No."; cin>>acno; cout<<"\n\nEnter The Name of The account Holder "; gets(name); cout<<"\nEnter Type of The account (C/S) "; cin>>type; type=toupper(type); cout<<"\nEnter The Initial amount(>=500 for Saving and >=1000 for current )"; cin>>deposit; cout<<"\n\n\nAccount Created.."; } void show_account() { cout<<"\nAccount No. : "<<acno; cout<<"\nAccount Holder Name : "; puts(name); cout<<"\nType of Account : "<<type; cout<<"\nBalance amount : "<<deposit; } void modify_account() { cout<<"\nAccount No. : "<<acno; cout<<"\nModify Account Holder Name : "; gets(name);

cout<<"\nModify Type of Account : ";cin>>type; cout<<"\nModify Balance amount : ";cin>>deposit; } void dep(int x) { deposit+=x; } void draw(int x) { deposit-=x; } void report() {cout<<acno<<"\t"<<name<<"\t\t"<<type<<"\t\t"<<deposit<<endl;} int retacno() {return acno;} float retdeposit() {return deposit;} char rettype() {return type;} }; //class ends here

//*************************************************************** // global declaration for stream object, object //**************************************************************** fstream fp; account ac;

//*************************************************************** // function to write in file //**************************************************************** void write_account() { fp.open("account.dat",ios::out|ios::app); ac.create_account(); fp.write((char*)&ac,sizeof(account)); fp.close(); }

//*************************************************************** // function to read specific record from file //****************************************************************

void display_sp(int n) { clrscr(); cout<<"\nBALANCE DETAILS\n"; int flag=0; fp.open("account.dat",ios::in); while(fp.read((char*)&ac,sizeof(account))) { if(ac.retacno()==n) { ac.show_account(); flag=1; } } fp.close(); if(flag==0) cout<<"\n\nAccount number does not exist"; getch(); }

//*************************************************************** // function to modify record of file //****************************************************************

void modify_account() { int no,found=0; clrscr(); cout<<"\n\n\tTo Modify "; cout<<"\n\n\tEnter The account No. of The account"; cin>>no; fp.open("account.dat",ios::in|ios::out); while(fp.read((char*)&ac,sizeof(account)) && found==0) { if(ac.retacno()==no) { ac.show_account(); cout<<"\nEnter The New Details of account"<<endl; ac.modify_account(); int pos=-1*sizeof(ac); fp.seekp(pos,ios::cur);

fp.write((char*)&ac,sizeof(account)); cout<<"\n\n\t Record Updated"; found=1; } } fp.close(); if(found==0) cout<<"\n\n Record Not Found "; getch(); }

//*************************************************************** // function to delete record of file //****************************************************************

void delete_account() { int no; clrscr(); cout<<"\n\n\n\tDelete Record"; cout<<"\n\nEnter The account no. of the customer You Want To Delete"; cin>>no; fp.open("account.dat",ios::in|ios::out); fstream fp2; fp2.open("Temp.dat",ios::out); fp.seekg(0,ios::beg); while(fp.read((char*)&ac,sizeof(account))) { if(ac.retacno()!=no) { fp2.write((char*)&ac,sizeof(account)); } } fp2.close(); fp.close(); remove("account.dat"); rename("Temp.dat","account.dat"); cout<<"\n\n\tRecord Deleted .."; getch(); }

//*************************************************************** // function to display all accounts deposit list //**************************************************************** void display_all() {

clrscr(); fp.open("account.dat",ios::in); if(!fp) { cout<<"ERROR!!! FILE COULD NOT BE OPEN\n\n\n Go To Admin Menu to create File"; getch(); return; } cout<<"\n\n\t\tACCOUNT HOLDER LIST\n\n"; cout<<"====================================================\n"; cout<<"A/c no.\tNAME\t\tType\t\tBalance\n"; cout<<"====================================================\n"; while(fp.read((char*)&ac,sizeof(account))) { ac.report(); } fp.close(); }

//*************************************************************** // function to deposit and withdraw amounts //**************************************************************** void deposit_withdraw(int option) { int no,found=0,amt; clrscr(); cout<<"\n\n\tEnter The account No."; cin>>no; fp.open("account.dat",ios::in|ios::out); while(fp.read((char*)&ac,sizeof(account)) && found==0) { if(ac.retacno()==no) { ac.show_account(); if(option==1) { cout<<"\n\n\tTO DEPOSITE AMOUNT "; cout<<"\n\nEnter The amount to be deposited"; cin>>amt; ac.dep(amt); } if(option==2) {

cout<<"\n\n\tTO WITHDRAW AMOUNT "; cout<<"\n\nEnter The amount to be withdraw"; cin>>amt; int bal=ac.retdeposit()-amt; if((bal<500 && ac.rettype()=='S') || (bal<1000 && ac.rettype()=='C')) cout<<"Insufficience balance"; else ac.draw(amt); } int pos=-1*sizeof(ac); fp.seekp(pos,ios::cur); fp.write((char*)&ac,sizeof(account)); cout<<"\n\n\t Record Updated"; found=1; } } fp.close(); if(found==0) cout<<"\n\n Record Not Found "; getch(); }

//*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** void intro() { clrscr(); gotoxy(31,11); cout<<"BANKING"; gotoxy(35,14); cout<<"TRANSACTIONS"; gotoxy(35,17); cout<<"SYSTEM"; cout<<"\n\nMADE BY : Bonnie B.Seabastian,Georgey S.Moolamkunnam,Mathews K.Varghese"; cout<<"\n\nSCHOOL : Placid Vidya Vihar"; getch(); }

//***************************************************************

// THE MAIN FUNCTION OF PROGRAM //****************************************************************

void main() { char ch; intro(); do { clrscr(); cout<<"\n\n\n\tMAIN MENU"; cout<<"\n\n\t01. NEW ACCOUNT"; cout<<"\n\n\t02. DEPOSIT AMOUNT"; cout<<"\n\n\t03. WITHDRAW AMOUNT"; cout<<"\n\n\t04. BALANCE ENQUIRY"; cout<<"\n\n\t05. ALL ACCOUNT HOLDER LIST"; cout<<"\n\n\t06. CLOSE AN ACCOUNT"; cout<<"\n\n\t07. MODIFY AN ACCOUNT"; cout<<"\n\n\t08. EXIT"; cout<<"\n\n\tSelect Your Option (1-8) "; ch=getche(); switch(ch) { case '1': clrscr(); write_account(); getch(); break; case '2': clrscr(); deposit_withdraw(1); break; case '3': clrscr(); deposit_withdraw(2); getch(); break; case '4': int num; clrscr(); cout<<"\n\n\tEnter The account No. "; cin>>num; display_sp(num); break; case '5': clrscr(); display_all(); getch(); break; case '6': delete_account(); break; case '7': clrscr(); modify_account(); getch();

break; case '8':exit(0); default :cout<<"\a"; } }while(ch!='8'); } //*************************************************************** // END OF PROGRAM //***************************************************************

OUTPUT

CONCLUSION

The project banking system is successfully made using C++ and output is verified by running in C++ compiler using the program we can use make of the work of bank easier.

BIBLIOGRAPHY
Computer Science C++ XI Computer Science C++ XII

www.icbse.com

You might also like