SlideShare uma empresa Scribd logo
1 de 31
COMPUTER SCIENCE
INVESTIGATORY PROJECT
TOPIC:- BANK MANAGEMENT
SYSTEM
BY
DIVYANSHU KUMAR
CLASS XII-A
2018-19
KENDRIYA VIDYALAYA NO 2
NAUSENABAGH, VISAKHAPATNAM
DEPARTMENT OF COMPUTER
SCIENCE
CERTIFICATE
This is to certify that DIVYANSHU
KUMAR of Class XII A has prepared the
investigatory project entitled “BANK
MANAGEMENT SYSTEM”. The project is the
result of his efforts and endeavors. The report is
found worthy of acceptance as final project
report. He has prepared the report under my
guidance.
PGT (COMPUTER SCIENCE)
D E C L A R A T I O N
I hereby declare that the project work
entitled “BANK MANAGEMENT SYSTEM”,
submitted to Department of Computer
Science, Kendriya Vidyalaya No. 2,
Nausenabaugh, Visakhapatnam is prepared
by me.
DIVYANSHU KUMAR
Class: XII A
Cbse roll no-
ACKNOWLEDGEMENT
Through this acknowledgement I express my sincere gratitude to
all those people who have been associated with the project and
helped meto makeit a worthwhileexperience.
Iextend my thanksto ourprincipal Mr.NishikantAggarwal
and (PGTComputerScience) fortheir
valuable guidance.
I would like to express my gratitude towards my parents for their
co-operation and encouragement which helped me to complete
this project.
S.No. CONTENTS
1. Introduction
2. Intro. To OOP
INDEX
3. Intro. To Data File
Handling
4. About The
Program
5. Header File Used
6. Source Code
7. Output
8. Bibliography
INTRODUCTION
C++ is a statically typed, compiled, general purpose, case-sensitive, free-
form programming language that supports procedural, object-oriented,
and generic programming. C++ is regarded as a middle-level language,
as it comprises a combination of both high-level and low-level language
features. C++ was developed by Bjarne Stroustrupstarting in 1979 at Bell
Labs in Murray Hill, New Jersey as an enhancement to the C language
and originally named C with Classes but later it was renamed
C++ in 1983.C++ is a superset of C, and that virtually any legal C
program is a legal C++ program. The most important thing to do when
learning C++ is to focus on concepts and not get lost in language
technical details. C++ is used by hundreds of thousands of programmers
in essentially every application domain. C++ is being highly used to write
device drivers and other software that rely on direct manipulation of
hardware under real time constraints. C++ is widely used for teaching
and research because it is cleaning enough for successful teaching of
basic concepts. Anyone who has used either an apple Macintosh or a PC
running windows has directly used C++ because the primary user
interfaces of these systemare written in C++.
INTRODUCTION TO OBJECT ORIENTED
PROGRAMMING CONCEPTS
Object Oriented Programming is a programming style that is
associated with the concept of Class, Objects and various other
concepts revolving around these two, like Inheritance,
Polymorphism, Abstraction, Encapsulation etc.
Basic OOPS concepts in c++
Here we will try to explain all the OOP concepts through this
example and later we will have the technical definitons for all
this.
Class
Here we can take Human Being as a class. A class is a blueprint
for any functional entity which defines its properties and its
functions. Like Human Being, having body parts, and performing
various actions.
Inheritance
Considering HumanBeing a class, which has properties like
hands, legs, eyes etc, and functions like walk, talk, eat, see etc.
Male and Female are also classes, but most of the properties and
functions are included in HumanBeing, hence they can inherit
everything from class HumanBeing using the concept of
Inheritance.
Abstraction
Abstraction means, showcasing only the required things to the
outside world while hiding the details. Continuing our example,
Human Being's can talk, walk, hear, eat, but the details are hidden
from the outside world. We can take our skin as the Abstraction
factor in our case, hiding the inside mechanism.
Encapsulation
This concept is a little tricky to explain with our example. Our
Legs are binded to help us walk. Our hands, help us hold things.
This binding of the properties to functions is called
Encapsulation.
Polymorphism
Polymorphism is a concept, which allows us to redefine the way
something works, by either changing how it is done or by
changing the parts using which it is done. Both the ways have
different terms for them.
If we walk using our hands, and not legs, here we will change the
parts used to perform something. Hence this is called
Overloading.
And if there is a defined way of walking, but I wish to walk
differently, but using my legs, like everyone else. Then I can walk
like I want, this will be called as Overriding.
OOPS Concept Definitions
Now, let us discuss some of the main features of Object Oriented
Programming which you will be using in C++(technically).
Objects
Classes
Abstraction
Encapsulation
Inheritance
Overloading
Exception Handling
Objects
Objects are the basic unit of OOP. They are instances of class,
which have data members and uses various member functions to
perform tasks.
Class
It is similar to structures in C language. Class can also be defined
as user defined data type but it also contains functions in it. So,
class is basically a blueprint for object. It declare & defines what
data variables the object will have and what operations can be
performed on the class's object.
Abstraction
Abstraction refers to showing only the essential features of the
application and hiding the details. In C++, classes provide
methods to the outside world to access & use the data variables,
but the variables are hidden from direct access. This can be done
access specifiers.
Encapsulation
It can also be said data binding. Encapsulation is all about binding
the data variables and functions together in class.
Inheritance
Inheritance is a way to reuse once written code again and again.
The class which is inherited is called base calls & the class which
inherits is called derived class. So when, a derived class inherits a
base class, the derived class can use all the functions which are
defined in base class, hence making code reusable.
It is a feature, which lets us create functions with same name but
different arguments, which will perform differently. That is
function with same name, functioning in different way. Or, it also
allows us to redefine a function to provide its new definition. You
will learn how to do this in details soon in coming lessons.
Exception Handling
Exception handling is a feature of OOP, to handle unresolved
exceptions or errors produced at runtime from the outside world.
We can take our skin as the Abstraction factor in our case, hiding
the inside mechanism.
INTRODUTION TO DATA FILE
HANDLING
Most computersprograms workwith files. This is because
files help in storing information permanently. A fileis itselfa
bunchofbytesstored onsome storagedevice like tape,or
magnetic disk, etc.
In C++, file input/outputfacilities are implemented
throughacomponentheaderfile pf C++ standardlibrary.
This headeris fstream.h.
In C++, a file, atlowest level, is interpretedsimply as a
sequence,or streamof bytes.One aspectof the file I/O
library managesthetransferof thesebytes.
The fstream library predefines a set of operations for
handling file related input and output. It defines certain
classes thathelpone performfile input andoutput.
ABOUT THE PROGRAM
The project “Bank Management System” has been
developed as a very understandable Databaseof methods
that can be created and handle easily. When you add a
person acc. details to the database, the details is added
automatically and settled in the binary file.
The project aimed to create an easy database which can be
handled and created easily. Generally, the database is being
a master file that possessesthe tabular format of person’s
acc. details, the sub menu for the account like acc. no. ,
deposit, name and menu option return.
HEADER FILES USED IN
PROGRAM
 fstream.h – For file handling, cin,
cout.
 stdio.h – For standard I/O
operations.
 process.h – For exit() function.
 iomanip.h – For setw() function.
 conio.h – For clrscr() & getch()
function.
 ctype.h – For toupper() function.
SOURCE CODE
//***************************************************************
// HEADER FILE USED IN PROJECT
//****************************************************************
#include<fstream.h>
#include<ctype.h>
#include<iomanip.h>
#include<conio.h>
#include<stdio.h>
//***************************************************************
// CLASS USED IN PROJECT
//****************************************************************
class account
{
int acno;
char name[50];
int deposit;
char type;
public:
void create_account(); //function to get data from user
void show_account(); //function to show data on screen
void modify(); //function to get new data from user
void dep(int); //function to accept amount and add to balance amount
void draw(int); //function to accept amount and subtract from balance
amount
void report(); //function to show data in tabular format
int retacno(); //function to return account number
int retdeposit(); //function to return balance amount
char rettype(); //function to return type of account
}; //class ends here
void account::create_account()
{
cout<<"nEnter The account No.";
cin>>acno;
cout<<"nnEnter 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<<"nnnAccount Created..";
}
void account::show_account()
{
cout<<"nAccount No. : "<<acno;
cout<<"nAccount Holder Name : ";
cout<<name;
cout<<"nType of Account : "<<type;
cout<<"nBalance amount : "<<deposit;
}
void account::modify()
{
cout<<"nThe account No."<<acno;
cout<<"nnEnter The Name of The account Holder : ";
gets(name);
cout<<"nEnter Type of The account (C/S) : ";
cin>>type;
type=toupper(type);
cout<<"nEnter The amount : ";
cin>>deposit;
}
void account::dep(int x)
{
deposit+=x;
}
void account::draw(int x)
{
deposit-=x;
}
void account::report()
{
cout<<acno<<setw(10)<<" "<<name<<setw(10)<<"
"<<type<<setw(6)<<deposit<<endl;
}
int account::retacno()
{
return acno;
}
int account::retdeposit()
{
return deposit;
}
char account::rettype()
{
return type;
}
//***************************************************************
// function declaration
//****************************************************************
void write_account(); //function to write record in binary file
void display_sp(int); //function to display account details given by user
void modify_account(int); //function to modify record of file
void delete_account(int); //function to delete record of file
void display_all(); //function to display all account details
void deposit_withdraw(int, int); // function to desposit/withdraw amount for given
account
void intro(); //introductory screen function
//***************************************************************
// THE MAIN FUNCTION OF PROGRAM
//****************************************************************
int main()
{
char ch;
int num;
clrscr();
intro();
do
{
clrscr();
cout<<"nnntMAIN MENU";
cout<<"nnt01. NEW ACCOUNT";
cout<<"nnt02. DEPOSIT AMOUNT";
cout<<"nnt03. WITHDRAW AMOUNT";
cout<<"nnt04. BALANCE ENQUIRY";
cout<<"nnt05. ALL ACCOUNT HOLDER LIST";
cout<<"nnt06. CLOSE AN ACCOUNT";
cout<<"nnt07. MODIFY AN ACCOUNT";
cout<<"nnt08. EXIT";
cout<<"nntSelect Your Option (1-8) ";
cin>>ch;
clrscr();
switch(ch)
{
case '1':
write_account();
break;
case '2':
cout<<"nntEnter The account No. : "; cin>>num;
deposit_withdraw(num, 1);
break;
case '3':
cout<<"nntEnter The account No. : "; cin>>num;
deposit_withdraw(num, 2);
break;
case '4':
cout<<"nntEnter The account No. : "; cin>>num;
display_sp(num);
break;
case '5':
display_all();
break;
case '6':
cout<<"nntEnter The account No. : "; cin>>num;
delete_account(num);
break;
case '7':
cout<<"nntEnter The account No. : "; cin>>num;
modify_account(num);
break;
case '8':
cout<<"nntThanks for using bank managemnt system";
break;
default :cout<<"a";
}
getch();
}while(ch!='8');
return 0;
}
//***************************************************************
// function to write in file
//****************************************************************
void write_account()
{
account ac;
ofstream outFile;
outFile.open("account.dat",ios::binary|ios::app);
ac.create_account();
outFile.write((char *) &ac, sizeof(account));
outFile.close();
}
//***************************************************************
// function to read specific record from file
//****************************************************************
void display_sp(int n)
{
account ac;
int flag=0;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
return;
}
cout<<"nBALANCE DETAILSn";
while(inFile.read((char *) &ac, sizeof(account)))
{
if(ac.retacno()==n)
{
ac.show_account();
flag=1;
}
}
inFile.close();
if(flag==0)
cout<<"nnAccount number does not exist";
}
//***************************************************************
// function to modify record of file
//****************************************************************
void modify_account(int n)
{
int found=0;
account ac;
fstream File;
File.open("account.dat",ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File could not be open !! Press any Key...";
return;
}
while(File.read((char *) &ac, sizeof(account)) && found==0)
{
if(ac.retacno()==n)
{
ac.show_account();
cout<<"nnEnter The New Details of account"<<endl;
ac.modify();
int pos=(-1)*sizeof(account);
File.seekp(pos,ios::cur);
File.write((char *) &ac, sizeof(account));
cout<<"nnt Record Updated";
found=1;
}
}
File.close();
if(found==0)
cout<<"nn Record Not Found ";
}
//***************************************************************
// function to delete record of file
//****************************************************************
void delete_account(int n)
{
account ac;
ifstream inFile;
ofstream outFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
return;
}
outFile.open("Temp.dat",ios::binary);
inFile.seekg(0,ios::beg);
while(inFile.read((char *) &ac, sizeof(account)))
{
if(ac.retacno()!=n)
{
outFile.write((char *) &ac, sizeof(account));
}
}
inFile.close();
outFile.close();
remove("account.dat");
rename("Temp.dat","account.dat");
cout<<"nntRecord Deleted ..";
}
//***************************************************************
// function to display all accounts deposit list
//****************************************************************
void display_all()
{
account ac;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
return;
}
cout<<"nnttACCOUNT HOLDER LISTnn";
cout<<"====================================================
n";
cout<<"A/c no. NAME Type Balancen";
cout<<"====================================================
n";
while(inFile.read((char *) &ac, sizeof(account)))
{
ac.report();
}
inFile.close();
}
//***************************************************************
// function to deposit and withdraw amounts
//****************************************************************
void deposit_withdraw(int n, int option)
{
int amt;
int found=0;
account ac;
fstream File;
File.open("account.dat", ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File could not be open !! Press any Key...";
return;
}
while(File.read((char *) &ac, sizeof(account)) && found==0)
{
if(ac.retacno()==n)
{
ac.show_account();
if(option==1)
{
cout<<"nntTO DEPOSITE AMOUNT ";
cout<<"nnEnter The amount to be deposited : ";
cin>>amt;
ac.dep(amt);
}
if(option==2)
{
cout<<"nntTO WITHDRAW AMOUNT ";
cout<<"nnEnter 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);
File.seekp(pos,ios::cur);
File.write((char *) &ac, sizeof(account));
cout<<"nnt Record Updated";
found=1;
}
}
File.close();
if(found==0)
cout<<"nn Record Not Found ";
}
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
{
cout<<"nnnt BANK MANAGEMENT SYSTEM n";
cout<<"t -------------------------------";
cout<<"nn MADE BY : DIVYANSHU & DEEPAK ";
cout<<"nn SCHOOL : Kendriya Vidyalaya No.2,NSB,Vizag”;
getch();
}
//***************************************************************
// END OF PROJECT
//***************************************************************
OUTPUT OF THE
PROGRAM
BIBLIOGRAPHY
HELP FROM
INTERNET
INFORMATION
FROM LIBARY
TEACHER’S
GUIDANCE
Bank Management System Project

Mais conteúdo relacionado

Mais procurados

12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science ProjectAshwin Francis
 
Computer science Investigatory Project Class 12 C++
Computer science Investigatory Project Class 12 C++Computer science Investigatory Project Class 12 C++
Computer science Investigatory Project Class 12 C++Rushil Aggarwal
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmhome
 
Faster PHP apps using Queues and Workers
Faster PHP apps using Queues and WorkersFaster PHP apps using Queues and Workers
Faster PHP apps using Queues and WorkersRichard Baker
 
Informatics Practices Project on Tour and travels
 Informatics Practices Project on Tour and travels  Informatics Practices Project on Tour and travels
Informatics Practices Project on Tour and travels Harsh Mathur
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory ProjectPrakhar Seth
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12RithuJ
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Aman Deep
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)KushShah65
 
yoga project Anumiti Jat Ardhachakrasana.pptx
yoga project   Anumiti Jat  Ardhachakrasana.pptxyoga project   Anumiti Jat  Ardhachakrasana.pptx
yoga project Anumiti Jat Ardhachakrasana.pptxDOLLY859626
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THSHAJUS5
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Pythonvikram mahendra
 
cbse 12 computer science investigatory project
cbse 12 computer science investigatory project  cbse 12 computer science investigatory project
cbse 12 computer science investigatory project D. j Vicky
 
Clean Code JavaScript
Clean Code JavaScriptClean Code JavaScript
Clean Code JavaScriptRiza Fahmi
 
IP Final project 12th
IP Final project 12thIP Final project 12th
IP Final project 12thSantySS
 
Ip library management project
Ip library management projectIp library management project
Ip library management projectAmazShopzone
 
Introduction To Catalyst - Part 1
Introduction To Catalyst - Part 1Introduction To Catalyst - Part 1
Introduction To Catalyst - Part 1Dan Dascalescu
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingHarsh Kumar
 

Mais procurados (20)

12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science Project
 
Computer science Investigatory Project Class 12 C++
Computer science Investigatory Project Class 12 C++Computer science Investigatory Project Class 12 C++
Computer science Investigatory Project Class 12 C++
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
 
English Project II - Interview/Research
English Project II - Interview/ResearchEnglish Project II - Interview/Research
English Project II - Interview/Research
 
Faster PHP apps using Queues and Workers
Faster PHP apps using Queues and WorkersFaster PHP apps using Queues and Workers
Faster PHP apps using Queues and Workers
 
Informatics Practices Project on Tour and travels
 Informatics Practices Project on Tour and travels  Informatics Practices Project on Tour and travels
Informatics Practices Project on Tour and travels
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory Project
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
yoga project Anumiti Jat Ardhachakrasana.pptx
yoga project   Anumiti Jat  Ardhachakrasana.pptxyoga project   Anumiti Jat  Ardhachakrasana.pptx
yoga project Anumiti Jat Ardhachakrasana.pptx
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
cbse 12 computer science investigatory project
cbse 12 computer science investigatory project  cbse 12 computer science investigatory project
cbse 12 computer science investigatory project
 
Clean Code JavaScript
Clean Code JavaScriptClean Code JavaScript
Clean Code JavaScript
 
IP Final project 12th
IP Final project 12thIP Final project 12th
IP Final project 12th
 
Ip library management project
Ip library management projectIp library management project
Ip library management project
 
Introduction To Catalyst - Part 1
Introduction To Catalyst - Part 1Introduction To Catalyst - Part 1
Introduction To Catalyst - Part 1
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 

Semelhante a Bank Management System Project

Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastacturesK.s. Ramesh
 
OOP-Advanced Programming with c++
OOP-Advanced Programming with c++OOP-Advanced Programming with c++
OOP-Advanced Programming with c++Mohamed Essam
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programmingPraveen M Jigajinni
 
Object Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesObject Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesFellowBuddy.com
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPTAjay Chimmani
 
Lotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScript
Lotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScriptLotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScript
Lotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScriptBill Buchan
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]Rome468
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxArifaMehreen1
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsITNet
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Bill Buchan
 
C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.pptcitizen15
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfHouseMusica
 

Semelhante a Bank Management System Project (20)

Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastactures
 
OOP-Advanced Programming with c++
OOP-Advanced Programming with c++OOP-Advanced Programming with c++
OOP-Advanced Programming with c++
 
C++ & VISUAL C++
C++ & VISUAL C++ C++ & VISUAL C++
C++ & VISUAL C++
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programming
 
Object Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesObject Oriented Programming Lecture Notes
Object Oriented Programming Lecture Notes
 
Bp301
Bp301Bp301
Bp301
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
Lotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScript
Lotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScriptLotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScript
Lotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScript
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptx
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objects
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
 
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
 
Chapter1 introduction
Chapter1 introductionChapter1 introduction
Chapter1 introduction
 
C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.ppt
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
 
Ad507
Ad507Ad507
Ad507
 

Último

DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSSLeenakshiTyagi
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfSumit Kumar yadav
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfSumit Kumar yadav
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINsankalpkumarsahoo174
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 

Último (20)

DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSS
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdf
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdf
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 

Bank Management System Project

  • 1. COMPUTER SCIENCE INVESTIGATORY PROJECT TOPIC:- BANK MANAGEMENT SYSTEM BY DIVYANSHU KUMAR CLASS XII-A 2018-19
  • 2. KENDRIYA VIDYALAYA NO 2 NAUSENABAGH, VISAKHAPATNAM DEPARTMENT OF COMPUTER SCIENCE CERTIFICATE This is to certify that DIVYANSHU KUMAR of Class XII A has prepared the investigatory project entitled “BANK MANAGEMENT SYSTEM”. The project is the result of his efforts and endeavors. The report is found worthy of acceptance as final project report. He has prepared the report under my guidance.
  • 3. PGT (COMPUTER SCIENCE) D E C L A R A T I O N I hereby declare that the project work entitled “BANK MANAGEMENT SYSTEM”, submitted to Department of Computer Science, Kendriya Vidyalaya No. 2, Nausenabaugh, Visakhapatnam is prepared by me. DIVYANSHU KUMAR Class: XII A Cbse roll no-
  • 4. ACKNOWLEDGEMENT Through this acknowledgement I express my sincere gratitude to all those people who have been associated with the project and helped meto makeit a worthwhileexperience. Iextend my thanksto ourprincipal Mr.NishikantAggarwal and (PGTComputerScience) fortheir valuable guidance. I would like to express my gratitude towards my parents for their co-operation and encouragement which helped me to complete this project.
  • 6. INDEX 3. Intro. To Data File Handling 4. About The Program 5. Header File Used 6. Source Code 7. Output 8. Bibliography
  • 7. INTRODUCTION C++ is a statically typed, compiled, general purpose, case-sensitive, free- form programming language that supports procedural, object-oriented, and generic programming. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. C++ was developed by Bjarne Stroustrupstarting in 1979 at Bell Labs in Murray Hill, New Jersey as an enhancement to the C language and originally named C with Classes but later it was renamed C++ in 1983.C++ is a superset of C, and that virtually any legal C program is a legal C++ program. The most important thing to do when learning C++ is to focus on concepts and not get lost in language technical details. C++ is used by hundreds of thousands of programmers in essentially every application domain. C++ is being highly used to write device drivers and other software that rely on direct manipulation of hardware under real time constraints. C++ is widely used for teaching and research because it is cleaning enough for successful teaching of
  • 8. basic concepts. Anyone who has used either an apple Macintosh or a PC running windows has directly used C++ because the primary user interfaces of these systemare written in C++. INTRODUCTION TO OBJECT ORIENTED PROGRAMMING CONCEPTS Object Oriented Programming is a programming style that is associated with the concept of Class, Objects and various other concepts revolving around these two, like Inheritance, Polymorphism, Abstraction, Encapsulation etc. Basic OOPS concepts in c++ Here we will try to explain all the OOP concepts through this example and later we will have the technical definitons for all this. Class Here we can take Human Being as a class. A class is a blueprint for any functional entity which defines its properties and its functions. Like Human Being, having body parts, and performing various actions. Inheritance Considering HumanBeing a class, which has properties like hands, legs, eyes etc, and functions like walk, talk, eat, see etc. Male and Female are also classes, but most of the properties and
  • 9. functions are included in HumanBeing, hence they can inherit everything from class HumanBeing using the concept of Inheritance. Abstraction Abstraction means, showcasing only the required things to the outside world while hiding the details. Continuing our example, Human Being's can talk, walk, hear, eat, but the details are hidden from the outside world. We can take our skin as the Abstraction factor in our case, hiding the inside mechanism. Encapsulation This concept is a little tricky to explain with our example. Our Legs are binded to help us walk. Our hands, help us hold things. This binding of the properties to functions is called Encapsulation. Polymorphism Polymorphism is a concept, which allows us to redefine the way something works, by either changing how it is done or by changing the parts using which it is done. Both the ways have different terms for them. If we walk using our hands, and not legs, here we will change the parts used to perform something. Hence this is called Overloading. And if there is a defined way of walking, but I wish to walk differently, but using my legs, like everyone else. Then I can walk like I want, this will be called as Overriding. OOPS Concept Definitions
  • 10. Now, let us discuss some of the main features of Object Oriented Programming which you will be using in C++(technically). Objects Classes Abstraction Encapsulation Inheritance Overloading Exception Handling Objects Objects are the basic unit of OOP. They are instances of class, which have data members and uses various member functions to perform tasks. Class It is similar to structures in C language. Class can also be defined as user defined data type but it also contains functions in it. So, class is basically a blueprint for object. It declare & defines what data variables the object will have and what operations can be performed on the class's object. Abstraction
  • 11. Abstraction refers to showing only the essential features of the application and hiding the details. In C++, classes provide methods to the outside world to access & use the data variables, but the variables are hidden from direct access. This can be done access specifiers. Encapsulation It can also be said data binding. Encapsulation is all about binding the data variables and functions together in class. Inheritance Inheritance is a way to reuse once written code again and again. The class which is inherited is called base calls & the class which inherits is called derived class. So when, a derived class inherits a base class, the derived class can use all the functions which are defined in base class, hence making code reusable. It is a feature, which lets us create functions with same name but different arguments, which will perform differently. That is function with same name, functioning in different way. Or, it also allows us to redefine a function to provide its new definition. You will learn how to do this in details soon in coming lessons. Exception Handling Exception handling is a feature of OOP, to handle unresolved exceptions or errors produced at runtime from the outside world. We can take our skin as the Abstraction factor in our case, hiding the inside mechanism. INTRODUTION TO DATA FILE
  • 12. HANDLING Most computersprograms workwith files. This is because files help in storing information permanently. A fileis itselfa bunchofbytesstored onsome storagedevice like tape,or magnetic disk, etc. In C++, file input/outputfacilities are implemented throughacomponentheaderfile pf C++ standardlibrary. This headeris fstream.h. In C++, a file, atlowest level, is interpretedsimply as a sequence,or streamof bytes.One aspectof the file I/O library managesthetransferof thesebytes. The fstream library predefines a set of operations for handling file related input and output. It defines certain classes thathelpone performfile input andoutput.
  • 13. ABOUT THE PROGRAM The project “Bank Management System” has been developed as a very understandable Databaseof methods that can be created and handle easily. When you add a person acc. details to the database, the details is added automatically and settled in the binary file. The project aimed to create an easy database which can be handled and created easily. Generally, the database is being a master file that possessesthe tabular format of person’s acc. details, the sub menu for the account like acc. no. , deposit, name and menu option return.
  • 14. HEADER FILES USED IN PROGRAM  fstream.h – For file handling, cin, cout.  stdio.h – For standard I/O operations.  process.h – For exit() function.  iomanip.h – For setw() function.  conio.h – For clrscr() & getch() function.  ctype.h – For toupper() function.
  • 15. SOURCE CODE //*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include<fstream.h> #include<ctype.h> #include<iomanip.h> #include<conio.h> #include<stdio.h> //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** class account { int acno; char name[50]; int deposit; char type; public: void create_account(); //function to get data from user void show_account(); //function to show data on screen void modify(); //function to get new data from user void dep(int); //function to accept amount and add to balance amount void draw(int); //function to accept amount and subtract from balance amount void report(); //function to show data in tabular format int retacno(); //function to return account number
  • 16. int retdeposit(); //function to return balance amount char rettype(); //function to return type of account }; //class ends here void account::create_account() { cout<<"nEnter The account No."; cin>>acno; cout<<"nnEnter 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<<"nnnAccount Created.."; } void account::show_account() { cout<<"nAccount No. : "<<acno; cout<<"nAccount Holder Name : "; cout<<name; cout<<"nType of Account : "<<type; cout<<"nBalance amount : "<<deposit; } void account::modify() { cout<<"nThe account No."<<acno; cout<<"nnEnter The Name of The account Holder : "; gets(name); cout<<"nEnter Type of The account (C/S) : "; cin>>type; type=toupper(type); cout<<"nEnter The amount : "; cin>>deposit; } void account::dep(int x) { deposit+=x; } void account::draw(int x) { deposit-=x;
  • 17. } void account::report() { cout<<acno<<setw(10)<<" "<<name<<setw(10)<<" "<<type<<setw(6)<<deposit<<endl; } int account::retacno() { return acno; } int account::retdeposit() { return deposit; } char account::rettype() { return type; } //*************************************************************** // function declaration //**************************************************************** void write_account(); //function to write record in binary file void display_sp(int); //function to display account details given by user void modify_account(int); //function to modify record of file void delete_account(int); //function to delete record of file void display_all(); //function to display all account details void deposit_withdraw(int, int); // function to desposit/withdraw amount for given account void intro(); //introductory screen function //*************************************************************** // THE MAIN FUNCTION OF PROGRAM //**************************************************************** int main() { char ch; int num; clrscr(); intro(); do { clrscr();
  • 18. cout<<"nnntMAIN MENU"; cout<<"nnt01. NEW ACCOUNT"; cout<<"nnt02. DEPOSIT AMOUNT"; cout<<"nnt03. WITHDRAW AMOUNT"; cout<<"nnt04. BALANCE ENQUIRY"; cout<<"nnt05. ALL ACCOUNT HOLDER LIST"; cout<<"nnt06. CLOSE AN ACCOUNT"; cout<<"nnt07. MODIFY AN ACCOUNT"; cout<<"nnt08. EXIT"; cout<<"nntSelect Your Option (1-8) "; cin>>ch; clrscr(); switch(ch) { case '1': write_account(); break; case '2': cout<<"nntEnter The account No. : "; cin>>num; deposit_withdraw(num, 1); break; case '3': cout<<"nntEnter The account No. : "; cin>>num; deposit_withdraw(num, 2); break; case '4': cout<<"nntEnter The account No. : "; cin>>num; display_sp(num); break; case '5': display_all(); break; case '6': cout<<"nntEnter The account No. : "; cin>>num; delete_account(num); break; case '7': cout<<"nntEnter The account No. : "; cin>>num; modify_account(num); break; case '8': cout<<"nntThanks for using bank managemnt system"; break; default :cout<<"a"; } getch(); }while(ch!='8'); return 0; }
  • 19. //*************************************************************** // function to write in file //**************************************************************** void write_account() { account ac; ofstream outFile; outFile.open("account.dat",ios::binary|ios::app); ac.create_account(); outFile.write((char *) &ac, sizeof(account)); outFile.close(); } //*************************************************************** // function to read specific record from file //**************************************************************** void display_sp(int n) { account ac; int flag=0; ifstream inFile; inFile.open("account.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; return; } cout<<"nBALANCE DETAILSn"; while(inFile.read((char *) &ac, sizeof(account))) { if(ac.retacno()==n) { ac.show_account(); flag=1; } } inFile.close(); if(flag==0) cout<<"nnAccount number does not exist"; } //*************************************************************** // function to modify record of file //**************************************************************** void modify_account(int n)
  • 20. { int found=0; account ac; fstream File; File.open("account.dat",ios::binary|ios::in|ios::out); if(!File) { cout<<"File could not be open !! Press any Key..."; return; } while(File.read((char *) &ac, sizeof(account)) && found==0) { if(ac.retacno()==n) { ac.show_account(); cout<<"nnEnter The New Details of account"<<endl; ac.modify(); int pos=(-1)*sizeof(account); File.seekp(pos,ios::cur); File.write((char *) &ac, sizeof(account)); cout<<"nnt Record Updated"; found=1; } } File.close(); if(found==0) cout<<"nn Record Not Found "; } //*************************************************************** // function to delete record of file //**************************************************************** void delete_account(int n) { account ac; ifstream inFile; ofstream outFile; inFile.open("account.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; return; } outFile.open("Temp.dat",ios::binary); inFile.seekg(0,ios::beg); while(inFile.read((char *) &ac, sizeof(account))) { if(ac.retacno()!=n)
  • 21. { outFile.write((char *) &ac, sizeof(account)); } } inFile.close(); outFile.close(); remove("account.dat"); rename("Temp.dat","account.dat"); cout<<"nntRecord Deleted .."; } //*************************************************************** // function to display all accounts deposit list //**************************************************************** void display_all() { account ac; ifstream inFile; inFile.open("account.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; return; } cout<<"nnttACCOUNT HOLDER LISTnn"; cout<<"==================================================== n"; cout<<"A/c no. NAME Type Balancen"; cout<<"==================================================== n"; while(inFile.read((char *) &ac, sizeof(account))) { ac.report(); } inFile.close(); } //*************************************************************** // function to deposit and withdraw amounts //**************************************************************** void deposit_withdraw(int n, int option) { int amt; int found=0; account ac; fstream File; File.open("account.dat", ios::binary|ios::in|ios::out); if(!File)
  • 22. { cout<<"File could not be open !! Press any Key..."; return; } while(File.read((char *) &ac, sizeof(account)) && found==0) { if(ac.retacno()==n) { ac.show_account(); if(option==1) { cout<<"nntTO DEPOSITE AMOUNT "; cout<<"nnEnter The amount to be deposited : "; cin>>amt; ac.dep(amt); } if(option==2) { cout<<"nntTO WITHDRAW AMOUNT "; cout<<"nnEnter 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); File.seekp(pos,ios::cur); File.write((char *) &ac, sizeof(account)); cout<<"nnt Record Updated"; found=1; } } File.close(); if(found==0) cout<<"nn Record Not Found "; } //*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** void intro() { cout<<"nnnt BANK MANAGEMENT SYSTEM n"; cout<<"t -------------------------------";
  • 23. cout<<"nn MADE BY : DIVYANSHU & DEEPAK "; cout<<"nn SCHOOL : Kendriya Vidyalaya No.2,NSB,Vizag”; getch(); } //*************************************************************** // END OF PROJECT //*************************************************************** OUTPUT OF THE PROGRAM
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.