This document describes Divyanshu Kumar's class 12 investigatory project on a bank management system created using C++. The project uses object-oriented programming concepts like classes, objects, inheritance and polymorphism to develop a program to manage bank accounts stored in a binary file. The program allows users to perform operations like creating new accounts, depositing and withdrawing amounts, checking balances and listing all accounts. The source code and outputs of the program are included along with an index and acknowledgements section.
Library Management Project (computer science) class 12RithuJ
This project descibes the Library management system.This includes the code, its output and the applications. This software has main menu, admin menu that has provision to create student & book record, display student & book record, modify student & book record, delete student & book record .
Rithu
AECS Kudankulam
Download link ( copy link to download )
https://drive.google.com/file/d/1TOz6arCdt4Nhfm_2emBzQCmgGSTCVQHy/view?usp=sharing
to add this to net beans just do this
1) open netbeans
2) on the top left, click file.
3) then click import project, there select from zip
4) use my file which u downloaded
5) import and thats it
Enjoy Using my Project as a reference for your own Project.
I hope that this will help you to understand what to do in your own project.
Happy Coding Nerds!!
git hub link to download it to ur system
https://github.com/Yosh1kageK1ra/12th-Class-Project-CBSE.git
CBSE Class 12 Computer practical Python Programs and MYSQL Rishabh-Rawat
This upload is my Computer Science Practical File for CBSE class 12 Board exam practical.
Some errors in the displaying of the content might have crept in as I prepared this file on my android. ;P
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
Here's my Computer Science Board Practical File. I hope you find it as useful as it was to me.This file is however of CBSE class 12th 2020-2021 syllabus.
Library Management Project (computer science) class 12RithuJ
This project descibes the Library management system.This includes the code, its output and the applications. This software has main menu, admin menu that has provision to create student & book record, display student & book record, modify student & book record, delete student & book record .
Rithu
AECS Kudankulam
Download link ( copy link to download )
https://drive.google.com/file/d/1TOz6arCdt4Nhfm_2emBzQCmgGSTCVQHy/view?usp=sharing
to add this to net beans just do this
1) open netbeans
2) on the top left, click file.
3) then click import project, there select from zip
4) use my file which u downloaded
5) import and thats it
Enjoy Using my Project as a reference for your own Project.
I hope that this will help you to understand what to do in your own project.
Happy Coding Nerds!!
git hub link to download it to ur system
https://github.com/Yosh1kageK1ra/12th-Class-Project-CBSE.git
CBSE Class 12 Computer practical Python Programs and MYSQL Rishabh-Rawat
This upload is my Computer Science Practical File for CBSE class 12 Board exam practical.
Some errors in the displaying of the content might have crept in as I prepared this file on my android. ;P
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
Here's my Computer Science Board Practical File. I hope you find it as useful as it was to me.This file is however of CBSE class 12th 2020-2021 syllabus.
This project is based on Library Management. Python and MySQL are the programming platforms which are used in making of this project.
Subject-Informatics Practices
Class-11/12
Computer science class 12 project on Super Market BillingHarsh Kumar
Certificate
--Declaration
--Acknowledgement
--Hardware and software requirements
--Classes and function used
--Header files used
--Files generated
--Working description
--Coding
--Output screen
--Bibliography
Development of an interactive car sale system which lets a user to find a car and its details is the main objective of this project. The administrators can access, enter, modify and delete the details of every car. Administrators are responsible of maintaining the details of vehicles like the Manufacturer information,
This project is based on Library Management. Python and MySQL are the programming platforms which are used in making of this project.
Subject-Informatics Practices
Class-11/12
Computer science class 12 project on Super Market BillingHarsh Kumar
Certificate
--Declaration
--Acknowledgement
--Hardware and software requirements
--Classes and function used
--Header files used
--Files generated
--Working description
--Coding
--Output screen
--Bibliography
Development of an interactive car sale system which lets a user to find a car and its details is the main objective of this project. The administrators can access, enter, modify and delete the details of every car. Administrators are responsible of maintaining the details of vehicles like the Manufacturer information,
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
it describes the main concepts of object oriented programming
For more posts : http://comsciguide.blogspot.com/
For full playlist of Interview puzzles videos : https://www.youtube.com/playlist?list=PL3v9ipJOEEPfI4zt4ExamGJwndkvg0SFc
24 standard interview puzzles: https://www.youtube.com/playlist?list=PL3v9ipJOEEPefIF4nscYOobim1iRBJTjw
Aptitude training playlist link : https://www.youtube.com/playlist?list=PL3v9ipJOEEPfumKHa02HWjCfPvGQiPZiG
for C and C++ questions, that are asked in the interviews, go through the posts in the link : http://comsciguide.blogspot.com/
for more videos, my youtube channel : https://www.youtube.com/channel/UCvMy2V7gYW7VR2WgyvLj3-A
Lotusphere 2007 BP301 Advanced Object Oriented Programming for LotusScriptBill Buchan
This session starts where the introductory Object Oriented Programming for LotusScript session stops. We'll show advanced encapsulation and inheritance, and demonstrates best practice code reuse with Object Oriented Programming techniques.You'll leave with a fully functional IBM Lotus Notes application containing enterprise features such as error trapping, log levels, code reuse and a far greater understanding of Object Oriented Programming methodology within LotusScript.
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Bill Buchan
Co-presented with Jens Augustini
Object Oriented Programming (OOP) may drastically reduce your coding time in projects that reach a higher degree of complexity, as it brings re-usable and consistent logic in the form of your own objects to your fingertips. This session will show how to create and use your own classes and how they can relate to the LotusScript Object Model. If you are familiar with LotusScript but don't know how to create your own classes, this session is for you!
Introduction to C++ : Object Oriented Technology, Advantages of OOP, Input- output in
C++, Tokens, Keywords, Identifiers, Data Types C++, Derives data types. The void data
type, Type Modifiers, Typecasting, Constant
Procedural Vs Object Oriented Programming
Procedural Programming
Can be defined as a programming model which is derived from structured programming,
based upon the concept of calling procedure. In these models, a programmer uses procedures
or functions to perform a task.
Languages used in Procedural Programming: C , Pascal , Fortan etc.
Object Oriented Programming can be defined as a programming model which is based
upon the concept of objects. Objects contain data in the form of attributes and code in the
form of methods. OOP concept uses variables and methods as procedural programs do, but it
focuses on the objects that contain variables and methods
Languages used in Object Oriented Programming:
Java, C++, C#, Python , Ruby
09/08/2022 3
Object-Oriented Programming (OOP)
Object Oriented programming (OOP) is a programming paradigm that relies on the
concept of classes and objects. It is used to structure a software program into simple,
reusable pieces of code blueprints (usually called classes), which are used to create individual
instances of objects.
It is a programming paradigm that structures a software program according to objects.
Simply put, it creates objects that contain functions and data. This paradigm relies
greatly on the concept of classes and objects.
The main aim of OOP is to bind together the data and the functions that operate on them so
that no other part of the code can access this data except that function.
09/08/2022 4
Object And Class
Class:A class is basically user-defined data types that act as a
template for creating objects of the identical type. It represents
the common properties and actions (functions) of an object.
Object: A real-world entity that has state and behavior. Here,
state represents properties and behavior represents actions and
functionality. For example, a person, chair, pen, table, etc
Object takes space in the memory but
class does not take any space in the
memory. Class does not exist physically
but an object exists physically.
09/08/2022 5
OOP Principles
Encapsulation: the attributes of an entity are enclosed in itself. In other words, encapsulation
is when an object (inside a class) keeps its state private and only exposes the selected
information.This principle requires the ability to define some fields as either private or public.
Abstraction: hide important information in order to reduce complexity. It is when the user
only interacts with specific object’s methods and/or attributes. By hiding complex details from
the user, abstraction consequently reduces complexity.
09/08/2022 6
OOP Principles
Inheritance: as the name indicates, an entity can inherit attributes from other entities. More
precisely, parent classes can extend their attributes and behaviors to child classes, which also
means that this principle supports reusability.
Polymorphism: entities can have more than one form. Hence the ‘poly’. In sum,
polymorphism is when objects are designed to share behaviors. By overriding
Seminar of U.V. Spectroscopy by SAMIR PANDASAMIR PANDA
Spectroscopy is a branch of science dealing the study of interaction of electromagnetic radiation with matter.
Ultraviolet-visible spectroscopy refers to absorption spectroscopy or reflect spectroscopy in the UV-VIS spectral region.
Ultraviolet-visible spectroscopy is an analytical method that can measure the amount of light received by the analyte.
Professional air quality monitoring systems provide immediate, on-site data for analysis, compliance, and decision-making.
Monitor common gases, weather parameters, particulates.
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...Sérgio Sacani
Since volcanic activity was first discovered on Io from Voyager images in 1979, changes
on Io’s surface have been monitored from both spacecraft and ground-based telescopes.
Here, we present the highest spatial resolution images of Io ever obtained from a groundbased telescope. These images, acquired by the SHARK-VIS instrument on the Large
Binocular Telescope, show evidence of a major resurfacing event on Io’s trailing hemisphere. When compared to the most recent spacecraft images, the SHARK-VIS images
show that a plume deposit from a powerful eruption at Pillan Patera has covered part
of the long-lived Pele plume deposit. Although this type of resurfacing event may be common on Io, few have been detected due to the rarity of spacecraft visits and the previously low spatial resolution available from Earth-based telescopes. The SHARK-VIS instrument ushers in a new era of high resolution imaging of Io’s surface using adaptive
optics at visible wavelengths.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.Sérgio Sacani
The return of a sample of near-surface atmosphere from Mars would facilitate answers to several first-order science questions surrounding the formation and evolution of the planet. One of the important aspects of terrestrial planet formation in general is the role that primary atmospheres played in influencing the chemistry and structure of the planets and their antecedents. Studies of the martian atmosphere can be used to investigate the role of a primary atmosphere in its history. Atmosphere samples would also inform our understanding of the near-surface chemistry of the planet, and ultimately the prospects for life. High-precision isotopic analyses of constituent gases are needed to address these questions, requiring that the analyses are made on returned samples rather than in situ.
Nutraceutical market, scope and growth: Herbal drug technologyLokesh Patil
As consumer awareness of health and wellness rises, the nutraceutical market—which includes goods like functional meals, drinks, and dietary supplements that provide health advantages beyond basic nutrition—is growing significantly. As healthcare expenses rise, the population ages, and people want natural and preventative health solutions more and more, this industry is increasing quickly. Further driving market expansion are product formulation innovations and the use of cutting-edge technology for customized nutrition. With its worldwide reach, the nutraceutical industry is expected to keep growing and provide significant chances for research and investment in a number of categories, including vitamins, minerals, probiotics, and herbal supplements.
This pdf is about the Schizophrenia.
For more details visit on YouTube; @SELF-EXPLANATORY;
https://www.youtube.com/channel/UCAiarMZDNhe1A3Rnpr_WkzA/videos
Thanks...!
Multi-source connectivity as the driver of solar wind variability in the heli...Sérgio Sacani
The ambient solar wind that flls the heliosphere originates from multiple
sources in the solar corona and is highly structured. It is often described
as high-speed, relatively homogeneous, plasma streams from coronal
holes and slow-speed, highly variable, streams whose source regions are
under debate. A key goal of ESA/NASA’s Solar Orbiter mission is to identify
solar wind sources and understand what drives the complexity seen in the
heliosphere. By combining magnetic feld modelling and spectroscopic
techniques with high-resolution observations and measurements, we show
that the solar wind variability detected in situ by Solar Orbiter in March
2022 is driven by spatio-temporal changes in the magnetic connectivity to
multiple sources in the solar atmosphere. The magnetic feld footpoints
connected to the spacecraft moved from the boundaries of a coronal hole
to one active region (12961) and then across to another region (12957). This
is refected in the in situ measurements, which show the transition from fast
to highly Alfvénic then to slow solar wind that is disrupted by the arrival of
a coronal mass ejection. Our results describe solar wind variability at 0.5 au
but are applicable to near-Earth observatories.
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