SlideShare una empresa de 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
CSc investigatory project

Más contenido relacionado

La actualidad más candente

Let us c yashwant kanetkar(1)
Let us c   yashwant kanetkar(1)Let us c   yashwant kanetkar(1)
Let us c yashwant kanetkar(1)
OMWOMA JACKSON
 

La actualidad más candente (20)

Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
 
OCP Java SE 8 Exam - Sample Questions - Lambda Expressions
OCP Java SE 8 Exam - Sample Questions - Lambda Expressions OCP Java SE 8 Exam - Sample Questions - Lambda Expressions
OCP Java SE 8 Exam - Sample Questions - Lambda Expressions
 
Data Structures Practical File
Data Structures Practical File Data Structures Practical File
Data Structures Practical File
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
Object Oriented Programming Using C++ Practical File
Object Oriented Programming Using C++ Practical FileObject Oriented Programming Using C++ Practical File
Object Oriented Programming Using C++ Practical File
 
Python-oop
Python-oopPython-oop
Python-oop
 
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
 
Project for Student Result System
Project for Student Result SystemProject for Student Result System
Project for Student Result System
 
C++ COMPUTER SCIENCE PROJECT
C++ COMPUTER SCIENCE PROJECTC++ COMPUTER SCIENCE PROJECT
C++ COMPUTER SCIENCE PROJECT
 
Data file handling in python introduction,opening & closing files
Data file handling in python introduction,opening & closing filesData file handling in python introduction,opening & closing files
Data file handling in python introduction,opening & closing files
 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
 
Chapter 02 functions -class xii
Chapter 02   functions -class xiiChapter 02   functions -class xii
Chapter 02 functions -class xii
 
Constructor and Types of Constructors
Constructor and Types of ConstructorsConstructor and Types of Constructors
Constructor and Types of Constructors
 
Railway reservation(c++)
Railway reservation(c++)Railway reservation(c++)
Railway reservation(c++)
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
 
C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked list
 
Pointers, virtual function and polymorphism
Pointers, virtual function and polymorphismPointers, virtual function and polymorphism
Pointers, virtual function and polymorphism
 
Let us c yashwant kanetkar(1)
Let us c   yashwant kanetkar(1)Let us c   yashwant kanetkar(1)
Let us c yashwant kanetkar(1)
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++
 

Similar a CSc investigatory project

Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastactures
K.s. Ramesh
 
OOP-Advanced Programming with c++
OOP-Advanced Programming with c++OOP-Advanced Programming with c++
OOP-Advanced Programming with c++
Mohamed Essam
 
C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.ppt
citizen15
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
HouseMusica
 

Similar a CSc investigatory 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

Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
Areesha Ahmad
 

Último (20)

High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai YoungDubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verifiedConnaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
 

CSc investigatory 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.