0% found this document useful (0 votes)
33 views

Project 15

Uploaded by

purusottam007
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Project 15

Uploaded by

purusottam007
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 79

1

CHAPTER-1:
INTRODUCTION

1.1Background

This project BANKING MANAGEMENT SYSTEM is developed to


provide easy hi-tech banking facilities. Current available Banking facility, Bulky
paper work consumes a huge time of employee and customer. The project is
developed using c++. It’s highly functional modules provides an easy transaction
process with a very high speed (according to the system criteria). The project
documentation provide bellow will provide a detailed of the procedure followed
during the analysis, coding, testing, and implementation phases.

1.2Objectives

The mission of this HSBC Bank Management Project is to provide the


highest quality, high speed, reliable, highly secure ,support system for bank. The
proposed computerized Banking Management System will save valuable time of
customers as well as employees. Elimination of time consuming paper work is the
prime motto.

1.3Purpose, scope, and Applicability

1.3.1 Purpose

It is practically impossible for a Bank to keep records of its transactions


without the aid of Information Technology. A group of employees can keep
2

maintaining and tallying the records. At the end a lot of resources are utilized in
excess, be it time, manpower or money. In addition the manual systems are prone
to errors and need constant checking and verification.

Need
To increase efficiency and customer service through the development
of a user-friendly, page-based banking management system, which
will:
 Allow for maintenance of a centralized database for the managers
of HSBC Bank
 Function through an interactive user-friendly environment with
entry, update, add, and delete options

1.3.2 Scope

The system will have the following functionalities:


 Equipped to handle four different types of transactions, namely:
1. Money transactions
2. Cheque facility.
3. Mortgage products.
4. Certificate of deposit products.
 Enabled to allow the bank managers to make changes in the
products.
 Permits multiple users to be able to access the database at any
given time
 Secured user interface that will allow easy navigation of various
parts of the page after confirming the login ID and password.
 Update/add/delete functionalities to edit the fields in the database
to allow for the most recent information about the products.
3

1.3.3Applicability

 This project helps you keep a record of daily banking transactions. The
program has been developed in C++ and is capable of holding any number
of accounts

1.3.3.1 Achievements

 Speedy transactions

 Saves customers time

 Account information easy to access

 Checking & Calculation of overall deposits and credits

 Drastic reduction in errors

 Generation of daily reports

1.4 Organization of Report

The strategic plan for the development of this application can be divided into
three units. They are;
1.4.1 Information technology goals
1.4.2 Information technology work plan
4

1.4.1Information technology goals

The following goals would be accomplished by pursuing the following standards


for the project:
 Login and security standards
 Requirements standards
 Code standards
 Table standards
 Reporting/Form standards
 Testing standards
 Documentation and training standards
.
Login and security standards
This project would be enabled with the following security features:
 A login and password prompt would be built in the “To be” system to
enable clients to identify themselves. ensure the security of the system
 The team is aiming to add an extra security feature to the system allowing
only
 The team would eventually set cookies on the page system for easy
navigation of the various links in the system

Requirement Standard
A page system with a centralized database for the managers of HSBC Bank will
be developed with four different kinds of bank products. These products include:
 The money market accounts
 The certificate of deposit accounts
 The mortgage accounts
 The credit card accounts

Code Standard
The coding style includes the following:
 The code will be clearly commented
 A standard indention of the code will be practiced for future readability of
the code
 Include the date for all code pages
5

Page system Standards:


 A easily navigable and user-friendly page system would be developed
 Review and update of the fields by the clients would be allowed
 The system would be empowered to carry on the querying and reporting
capabilities.
 The system would be enabled to grow with the company’s expansion.
Testing Standards
 The team members have developed the testing phase with the utmost
care. Each part of the program and page system would be tested
individually and as a group by the team members.
 The testing team would concentrate on the security and functionality of
the system
Documentation and training standards
 The documentation of the work inclusive of the past milestones would
be placed as a link to the page system.
 This is expected to aid in future developments to the page system for
current and future users.

1.4.2 Information technology work plan

The team members would work together in building a successful project. Any
changes to the system or proposed changes would be duly communicated to the
client and carried on after receiving the client’s written approval.
6

CHAPTER 2
SURVEY OF TECHNOLOGIES

This is an automated system for Bank Management. It uses files to handle the
daily transactions, account management and user management. Purely written in
C++ Language. Nice graphical layout and mouse functionality. Manager can add,
edit and delete the accounts and manage the user accounts. This performs the
following functions: Create Individual Accounts, Manage existing accounts, View
daily transactions.
7

CHAPTER-3
Requirements and Analysis

3.1 Problem Definition

This phase of system development is of great importance because it is must, for a


system analyst it is necessary to have a deep knowledge of the topic on which he
is working. He should study the exciting system on which the firm is working and
should note down the limitation & plus point of it. He should have visits and
inspection in the firm to study the system used. He should also study the output
provided by the existing system. It was good habit of the analyst to use the plus
point of the present system.
In this system we found that all the work order and material, equipment
entries are generating manually and the user has to remember lot of things like for
e.g. To generate one order, one has to remember the code, name, rate of particular
item, according to the schedule. And there are many jobs done in the organization
so preparing work order prepared of the particular schedule one has to search all
the records, which is also very time consuming and tiring work.

The bank management system is an application for maintaining a person’s


account in a bank. The system provides the access to the customer to create an
account, deposit/withdraw the cash from his account, also to view reports of all
accounts present. To develop a software for solving financial applications of a
customer in
banking environment in order to nurture the needs of an end banking user by
providing various ways to perform banking tasks. Also to enable the user’s
workspace to have additional functionalities which are not provided under
conventional banking software.

3.1.1 PROBLEM PROFILE:

3.1.1.1 DETAIL DESCRIPTION OF THE PROBLEM:


8

For computerization of the existing manual system or conversion of the


old system it is required for the developer to fully understand the functioning of
the existing manual system or the old system in terms of inputs, outputs and flow
of information is passed and in what form so that is from where to where the
information is passed and in what form so that computerized format of the
inputs/outputs and reports can be prepared.

3.2 Requirements Specification

The first step of system analysis process involves the identification of


need. The analyst meets with the customer and the end user. Identification of need
is the starting point in the evolution of a computer-based system. The analyst
assists the customer on defining the goals of the system:

 What information will be produced?


 What information is to be provided?
 What functions and performances are required?

The analyst makes sure to distinguish between customer “needs” and customer
“wants. Information gathered during the need identification step is specified in a
system concept document:
The customer before meetings sometimes prepares the original concept document
with the analyst. Invariably, customer-analyst communication results in the
modifications to the documents.

The existing system was in sufficient in terms of speed & accuracy. It has
the drawback in terms of management views and operation drawbacks. It took a lot
of time in sending and receiving the registers. Preparing the reports even in simple
reports and also in searching the records. Also the current running system faces
many problems, the major problems are : Large data storage because system gets
slow and therefore they only have the data of maximum 6 or 7 months not an online
system and not have any rule checks which is done manually. So data also kept in
registers etc. and have the probabilities of the data lost .And also the manual and
current system took so much of man labor, time and effort to present the simplest of
task. So that all the problem leads to design the new Bank Management System.
Shared, complete and accurate information requirements are essential in
building computerized system. To determine the information requirements of each
user is difficult task, especially in a system, which is to be implemented in a
major way. All the user of various locations will have access to the MAIN MDI
menu. Transaction wise insert and update or query authority will be granted to
users.
9

3.3 Planning and Scheduling:

3.3.1 Team Structure Chart

Counselor
Mr. M K Patel

Team Coordinator
Auditor/Reviewer Data Manager Quality Manager
S K Mohapatra
Miss Archana Panda A K Hota S R Pinninti

Fig No 1: Team Structure Chart

Table 1: Table of Staffing Plan

Role Description Assigned To


Team Coordinator Oversees the project and ensures Subrat Kumar Mohapatra
that it meets its objective in time,
function, and cost according to
the project plan
Auditor/ Reviewer Ensures the system will provide Miss. Archana Panda
the business with value and meet
the business’s requirements.
Design the information system
and ensure the system conforms
to information systems standards
Data Manager Table Design, implementing Amit Kumar Hota
integrity constraints, data type,
and documentation standard
checking.
Quality Manager Design the project page system. Shrinivash Rao Pinninti
Communicate and negotiate with
the client. Checking the quality of
software.
10

3.3.2 Communication and Meetings

Email is the main tool to communicate among members. We held weekly


meetings, however, we mobiles conference calls for taking minor decisions. We
will also frequently meet on an as-needed basis.

3.3.3Interaction with Client

We will update the Client only when major portions of the project have been
completed. The Project Manager or Formal Liaison with Client will be the main
contact person for our client.

We will try our best to meet the cost that is approved by our customer. However,
if we have to go over budget, we will set-up a meeting with our customer and give
full explanation about the matter. Then we will let the customer decide whether it
goes over budget with full functionalities or curtail some of them that were
planned at the initial planning and analysis stages of project. We will try to
convince our customer to have full functionalities if they are relevant to the
business value, even though it may require going over budget.

3.3.4 Gantt chart

Fig NO 2: Gantt chart


11

3.4 Software and Hardware Requirements:

3.4.1 Hardware Requirement:

C++ is not a graphic reqd. language it depends on the processor for c to run
but most probably it would run on any machines almost 99%

AMD Athlon/Duron (or compatible) CPU running at


250 MHz or higher.
16 MB of RAM, 2 GB of HD space.
8X CD ROM or higher.

3.4.2 Software Requirements

Dos, Windows 98, Windows 98 SE, Millennium Edition, XP Home/professional.


It just requires a c++ compiler.

3.5 Preliminary Product Description:

The basis for all of banking system is solid technology. A modular system concept supports
a variety of configurations and permits a wide range of applications self service system are
a great help in shaping the image of service oriented enterprises solutions for direct deposits
of banknotes can be implemented both with dedicated deposit systems and through
additional functions in multifunction systems.
. The various facilities provided by this Project, Banking System, are highlighted
below.
12

 In the first option the account of a particular person is displayed by giving


simply the account no. of that person.

 In second option you can see the list of all the accounts.

 Through third option you can do banking transactions


(Deposit/Withdraw).

 In Fourth option you can open new account. (NOTE: Opening


amount i.e., the first deposit should not be less than Rs.500/-).

 In Fifth option you can modify or Delete any account.

 In Sixth option the help menu is displayed.

This is the last option i.e., Quit (Exit to System).


13

3.6 Conceptual Models


14

Main page
See
Account

List of
1. Enter
Accounts
new Acc.
2. Exit.
Transaction
.
1.AccNo.
2.Name
3.Balanc New
e Account
1. Enter
new Acc. Edit
2. Exit. Accounts

1. Name of person
2. Adress of person Help
3. Name of Verifying
Person
4. Initial Deposit
5. Exit Quit

1. Enter
new Acc.
2. Exit.
Exit.
INITIAL.DAT
15

Flow chart
Fig No 3: System Flow Diagram

start

Wait for user


command

Yes
Comma
nd stop
= Quit
No

No
User
Comma
command= permit user
nd=inter
deposit report
est entry
entry

Yes

fill deposit entry form


Show interest entry
form

Fig No 4: Flow Chart for the Start Form


16

Start

Fill Deposit Form

Create Account No

Let The User To Go


Through Other Field

Validation

Wait For The Next


Command

Is Empty Form
Inser
t

yes
No
Save Is
Error Sav
e

no
17

Fig No 5: Flow Chart for Deposit Form

Start

Fill Deposit Form

Let the user to go


through other field

Validation

Wait for the


next command

Is
Inser
t Empty Form

No Save Is
no
error Save
yes
18

Fig No 6: Flow Chart for Interest Form

Data Flow Diagram

Accounts
Bank Clerk Manager
Data Request

Deposit Form
Verification &
Cash Receive

Deposit Type,
Int. Amount,
A/c No.

Reports &
Acknowledgement

Computerized
Client Info.
Bank Deposit
& Cash Detail Info. Account
Client Deposit Section
Certificate, Maturity /withdraw Required Info.
Value Interest Rate For Processing
& Deposit Related System
Query

Change Interest
Query For Illegal Slab & Term &
Transactions Conditions

Required Info. &


Reports Reports &
Info.

Government
R.B.I
19

Fig No 7: Context Diagram (0-level DFD)

1st level Data Flow Diagram

BANK
CLERK

Cash
Deposit form check,account
verifying no, client info ,
authentication

FORM Int master


Accounts VERIFY
Clients form,
deposit &
3 authentication
information

Client form, info,


cash deposit INTREST
DEPOSIT DETAIL
CLI PROCESSIN
Client PROCESSIN
ENT G1 Deposit
Certificates,
itrrestDetail
G2
reports,mat
intrest rate, Info.
deposit query Deposit
Detail Info.
Required Info.
Deposit For Processing
Detail Info.

ACCOUNT
SECTION
20

Fig No 8: 1st level Data Flow Diagram

ENTITY REALATION DIAGRAM

Accou
Known Deposi Deposi
nt Occupatio Payabl
Known _Since t t
No n e
Period Date Period
Curren Tel_No To
Interes
O t
Deposi t
Introdcer INTRODUCER acct_N Rate
Accou t
Name o
nt Amou
No nt
Address
Accou Maturit
INTRODUC Cit O nt
E y
Cit y
Nam  Maturit
y Deposi
e y
Address t Value
Date
Type
JOINT ACCOUNT DEPOSIT
HOLDER HAVIN ACCOUNT
HOLDER DEPOSI
G
T IN Receipt_n
o

Accou
nt NOMINAT MAINTAIN
Tel_No
ES S

Curren No
Occupatio
t n
acct_N O
o Accou NOMINEE BANK
nt
No Nam
Relatio e
O n Cit Location
IS IS y
A A
EFFECTED
MINOR MINOR BY
DEPOSITOR NOMINEE
Relatio
n Eff_date
Dob Acct_n
INT_MASTER
Dob o
Guardia Slab
n Name Slab 6
1
Acct_ Appointe Appointe
no d Age Slab Slab
d Name
2 Slab 5
3 Slab
Appointe 4
d add
21

Fig No 9: ENTITY REALATION DIAGRAM

CHAPTER 4
System Design

System layout is the first step of the software development, which


requires a mindful and sensible planning. The aim of S W designing is to
achieve the desired goal by planning how the various parts are to be coded
properly. It is to be coded carefully because if these phases contain any error
that is going to effect the performance of the system. As a result it may take
more processing time and extra coding i.e. programs will occupy and
conditions.

4.1DESIGN OBJECTIVES:-

Goals in mind while designing the system:-


 To reduce the manual work required to be done.
 To avoided errors inherent manually making the output inconsistent
and incorrect.
 To make the system complete menu driven & user friendly.
 To design the system so that even the non-programmers cans use the
system effectively and system could acts as catalyst in achieve
objectives.
 To improve the management of permanent information of the
company by keeping it in properly structured tables.
 To provide the facility to modify the records whenever required.
 To provide a particular card/all records option is provided.
 To design the system so that report for different forms can be obtained.
22

4.2 DESIGN DECISION:-

The system has been decided to be developed in C++ as front end and
back end as the system has the following requirements:-
1. Transaction processing performance and modification.
2. Large database and controlled availability.

Design Goals:-
Goals kept in mind while designing the system:
 To reduce the manual work and handling of registers.
 The number of man-hours spent on the physical jobs in the office should
be drastically reduced.
 The system is made user friendly while making it menu-driven .This
helps the user to use it with case.
 To reduce errors done while doing the manual work and thus, making
decisions which play a key role in the growth of any business concern.
Data Design
Schema design:
Procedural Design
Logic Diagrams
Data Structures:
Algorithms Design

4.3 User Interface Design


23

For accessing the Banking Management System from the terminal,


may use help option provided as an integrated part of the system, may
invoke a user retain application program that accept command from the
terminal and in turn issues request on the end user behalf.

The Loading Screen

Fig No 10: The Loading Screen


24

Welcome Screen:

Fig No 11: The Welcome Screen

The Main Menu


25

Fig No 12: The Main Menu


The See Account Screen

Fig No 13: The See Account Screen

The List of Account Screen

Fig No 14: The List of Account Screen


26

The Open New Account Screen

Fig No 15: The Open New Account Screen


27

The Edit Account Screen

The Help Screen Fig No 16: The Edit Account Screen


28

Fig No 17: The Help Screen

4.4 Security issues

The security testing for the team involved the following:


Login /password security.
29

CHAPTER 5
Implementation and Testing

Implementation- After a thorough testing of the different aspect of the system


as described above are to be put to actual use by using live data by user staff
sufficient training fore the use of software has been provided to the staff member.
The result indicated a considerable time saving with the candidate system and
comes out with fast and efficient development.

5.1Testing

Once a system has been designed it is necessary to under go an exhaustive testing


before installing the system. This is important because in some cases a small error
not detected and corrected early before installation .May explode in to a much
larger problem later on .Testing is being performed when users are asked to assist
in identifying all possible situation that might arises as regards the factor that
efforts were put to tackle the problem under consideration.

5.2 Coding Details (Source code)


#include <graphics.h>
#include <dos.h>
#include <iostream.h>
#include <fstream.h>
#include <process.h>
#include <string.h>
#include <stdlib.h>
30

#include <stdio.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>

void gra1();
void gra2(); //Program segment to display some graphic
void box(int,int);

//**********************************************************
// THIS CLASS CONTAINS FUNCTIONS RELATED TO DRAW BOX
ETC.
//**********************************************************

class shape
{
public : //Public member functions
void line_hor(int, int, int, char) ;
void line_ver(int, int, int, char) ;
void box(int,int,int,int,char) ;
};

//**********************************************************
// THIS CLASS CONTROL ALL THE FUNCTIONS IN THE MENU
//**********************************************************

class control
{
public :
void main_menu(void) ; //Public member functions
void help(void) ;
private :
void edit_menu(void) ; //Private member functions

};

//**********************************************************
// THIS CLASS CONTAINS FUNCTIONS RELATED TO INITIAL DEPOSIT
//**********************************************************

class initial
{
public :
void add_to_file(int, char t_name[30], char t_address[60], float) ;
void display_list(void) ;
31

void delete_account(int) ;
void update_balance(int, float) ;
void modify(void) ;
int last_accno(void) ;
int found_account(int) ;
char *return_name(int) ; //So that the private members of
class
char *return_address(int) ; //can be used in required segments.
float give_balance(int) ;
int recordno(int) ; void display(int) ;
private :
void modify_account(int, char t_name[30], char t_address[60]) ;
void box_for_list(void) ;

int accno ; //Private member elements


char name[30], address[60] ;
float balance ;
};

//**********************************************************
// THIS CLASS CONTAINS FUNCTIONS RELATED TO TRANSACTIONS
//**********************************************************

class account
{
public :
void new_account(void) ;
void close_account(void) ;
void display_account(void) ;
void transaction(void) ;
void clear(int,int) ;
private :
void add_to_file(int, int, int, int, char, char
t_type[10], float, float, float) ;
void delete_account(int) ;
int no_of_days(int, int, int, int, int, int) ;
float calculate_interest(int, float) ;
void display(int) ;
void box_for_display(int) ;

int accno ;
char type[10] ; // Cheque or Cash
int dd, mm, yy ; // Date
char tran ; // Deposit or Withdraw
float interest, amount, balance ;
};
32

//**********************************************************
// CLASS SHAPE :: FUNCTION TO DRAW HORIZONTAL LINE
//**********************************************************

void shape :: line_hor(int column1, int column2, int row, char c)


{
for ( column1; column1<=column2; column1++ )
{
gotoxy(column1,row) ;
cout <<c ;
}
}

//**********************************************************
// CLASS SHAPE :: FUNCTION TO DRAW VERTICAL LINE
//**********************************************************

void shape :: line_ver(int row1, int row2, int column, char c)


{

for ( row1; row1<=row2; row1++ )


{
gotoxy(column,row1) ;
cout <<c ;
}
}

//**********************************************************
// CLASS SHAPE :: FUNCTION TO DRAW BOX LINE
//**********************************************************

void shape :: box(int column1, int row1, int column2, int row2, char c)
{
char ch=218 ;
char c1, c2, c3, c4 ;
char l1=196, l2=179 ;
if (c == ch)
33

{
c1=218 ;
c2=191 ;
c3=192 ;
c4=217 ;
l1 = 196 ;
l2 = 179 ;
}
else
{
c1=c ;
c2=c ;
c3=c ;
c4=c ;
l1 = c ;
l2 = c ;
}
gotoxy(column1,row1) ;
cout <<c1 ;
gotoxy(column2,row1) ;
cout <<c2 ;
gotoxy(column1,row2) ;
cout <<c3 ;
gotoxy(column2,row2) ;
cout <<c4 ;
column1++ ;
column2-- ;
line_hor(column1,column2,row1,l1) ;
line_hor(column1,column2,row2,l1) ;
column1-- ;
column2++ ;
row1++ ;
row2-- ;
line_ver(row1,row2,column1,l2) ;
line_ver(row1,row2,column2,l2) ;
}

//
******************************************************************
****
CLASS CONTROL :: FUNCTION TO DISPLAY MAIN MENU AND CALL
OTHER FUNCTIONS
//
******************************************************************
****
34

void control :: main_menu(void)


{
void selected(int);
void toggle(int,int);
char m1[]="1: SEE ACCOUNT ",m2[]="2: LIST OF
ACCOUNTS",m3[]="3: TRANSACTIONS ",
m4[]="4: OPEN NEW ACCOUNT",m5[]="5: EDIT
ACCOUNT ",m6[]="6: HELP ",
m7[]="7: QUIT ";
static int counter=0;
while(1)
{
int gd=DETECT,gm=DETECT;
initgraph(&gd,&gm,"..\\bgi");
counter++;
setfillstyle(1,7);
floodfill(320,240,1);
settextjustify(1,1);
setcolor(8);
settextstyle(7,0,0);
setusercharsize(27,10,5,3);
if (counter==1)
{
outtextxy(320,35,"B "); delay(100);
outtextxy(320,35," A "); delay(100);
outtextxy(320,35," N "); delay(100);
outtextxy(320,35," K "); delay(100);
outtextxy(320,35," I "); delay(100);
outtextxy(320,35," N "); delay(100);
outtextxy(320,35," G");
for(int i=0,j=640;i<610;i++,j--)
{
sound(12*i);
setcolor(4);
line(i,15,i-570,15);
line(j,65,j+570,65); delay(5);
putpixel(i-570,15,7);
putpixel(j+570,65,7);
}
nosound();
}
else
{
setusercharsize(27,12,5,3);
outtextxy(320,35,"B A N K I N G");
35

setcolor(8);
line(610,15,40,15);
line(600,65,30,65);
}
settextstyle(7,1,5);
outtextxy(90,270,"M A I N");
outtextxy(550,270,"M E N U");
settextstyle(1,0,2);
char ch;
int choice=1,temp;
box(1,9);
box(2,7);
box(3,7);
box(4,7);
box(5,7);
box(6,7);
box(7,7);
setcolor(1);
outtextxy(320,90,m1);
setcolor(15);
outtextxy(320,150,m2);
outtextxy(320,210,m3);
outtextxy(320,270,m4);
outtextxy(320,330,m5);
outtextxy(320,390,m6);
outtextxy(320,450,m7);
//72 up
//80 down
//75 left
//77 right
//13 enter
//49 1
//71 Home
//79 End
//73 PgUp
//81 PgDown
//27 Escape
do
{
temp=choice;
ch=getch();
switch (ch)
{
case 72:
case 75: choice=((--choice+7)%7);
toggle(choice,temp);
36

continue;
case 77:
case 80: choice=(++choice%7);
toggle(choice,temp);
continue;
case 73: choice=(choice+12)%7;
toggle(choice,temp);
break;
case 81: choice=(choice+2)%7;
toggle(choice,temp);
break;
case 71:
case 49: choice=1;
toggle(choice,temp);
break;
case 50: choice=2;
toggle(choice,temp);
break;
case 51: choice=3;
toggle(choice,temp);
break;
case 52: choice=4;
toggle(choice,temp);
break;
case 53: choice=5;
toggle(choice,temp);
break;
case 54: choice=6;
toggle(choice,temp);
break;
case 79:
case 55: choice=0;
toggle(choice,temp);
break;
case 27: choice=0;
toggle(choice,temp);
case 13: selected(choice);
delay(500);
}
}
while (ch!=13&&ch!=27);
for(int i=320;i>0;i--)
{
if((counter==1)||(choice==0))
sound(3*i);
setcolor(1);
37

line(320-i,0,320-i,480);
line(320+i,0,320+i,480);
line(0,320-i,640,320-i);
line(0,160+i,640,160+i);
delay(2);
}
nosound();
closegraph();
if (choice == 1)
{
account a ;
a.display_account() ;
}
else
if (choice == 2)
{
initial ini ;
ini.display_list() ;
}
else
if (choice == 3)
{
account a ;
a.transaction() ;
}
else
if (choice == 4)
{
account a ;
a.new_account() ;
}
else
if (choice == 5)
edit_menu() ;
else
if (choice == 6)
help() ;
else
if (choice == 0)
{
break;
}
}
}
void toggle(int i,int temp)
{
38

char m1[]="1: SEE ACCOUNT ",m2[]="2: LIST OF


ACCOUNTS",m3[]="3: TRANSACTIONS ",
m4[]="4: OPEN NEW ACCOUNT",m5[]="5: EDIT
ACCOUNT ",m6[]="6: HELP ",
m7[]="7: QUIT ";
if (i==0) i=7;
if (temp==0) temp=7;
box(temp,7);
switch(temp)
{
case 1: box(1,7);
setcolor(15);
outtextxy(320,90,m1);
break;
case 2: box(2,7);
setcolor(15);
outtextxy(320,150,m2);
break;
case 3: box(3,7);
setcolor(15);
outtextxy(320,210,m3);
break;
case 4: box(4,7);
setcolor(15);
outtextxy(320,270,m4);
break;
case 5: box(5,7);
setcolor(15);
outtextxy(320,330,m5);
break;
case 6: box(6,7);
setcolor(15);
outtextxy(320,390,m6);
break;
case 7: box(7,7);
setcolor(15);
outtextxy(320,450,m7);
break;
}

switch(i)
{
case 1: box(1,9);
setcolor(1);
outtextxy(320,90,m1);
break;
39

case 2: box(2,9);
setcolor(1);
outtextxy(320,150,m2);
break;
case 3: box(3,9);
setcolor(1);
outtextxy(320,210,m3);
break;
case 4: box(4,9);
setcolor(1);
outtextxy(320,270,m4);
break;
case 5: box(5,9);
setcolor(1);
outtextxy(320,330,m5);
break;
case 6: box(6,9);
setcolor(1);
outtextxy(320,390,m6);
break;
case 7: box(7,9);
setcolor(1);
outtextxy(320,450,m7);
break;
}
}
void selected(int i)
{
if(i==0) i=7;
delay(350);
setcolor(0);
line(180,60*(i+.5)-20,180,60*(i+.5)+20);
line(180,60*(i+.5)-20,460,60*(i+.5)-20);
setcolor(15);
line(460,60*(i+.5)-20,460,60*(i+.5)+20);
line(180,60*(i+.5)+20,460,60*(i+.5)+20);
line(461,60*(i+.5)-20,461,60*(i+.5)+21);
line(180,60*(i+.5)+21,461,60*(i+.5)+21);
delay(350);
setcolor(15);
line(180,60*(i+.5)-20,180,60*(i+.5)+20);
line(180,60*(i+.5)-20,460,60*(i+.5)-20);
setcolor(0);
line(460,60*(i+.5)-20,460,60*(i+.5)+20);
line(180,60*(i+.5)+20,460,60*(i+.5)+20);
line(461,60*(i+.5)-20,461,60*(i+.5)+21);
40

line(180,60*(i+.5)+21,461,60*(i+.5)+21);
}
void box(int i,int color)
{
setcolor(5);
line(180,60*(i+.5)-20,180,60*(i+.5)+20);
line(180,60*(i+.5)-20,460,60*(i+.5)-20);
line(460,60*(i+.5)-20,460,60*(i+.5)+20);
line(180,60*(i+.5)+20,460,60*(i+.5)+20);
setfillstyle(1,color);
floodfill(320,60*(i+.5),5);
setcolor(15);
line(180,60*(i+.5)-20,180,60*(i+.5)+20);
line(180,60*(i+.5)-20,460,60*(i+.5)-20);
setcolor(0);
line(460,60*(i+.5)-20,460,60*(i+.5)+20);
line(180,60*(i+.5)+20,460,60*(i+.5)+20);
line(461,60*(i+.5)-20,461,60*(i+.5)+21);
line(180,60*(i+.5)+21,461,60*(i+.5)+21);
}

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

// CLASS CONTROL :: FUNCTION TO DISPLAY EDIT MENU AND CALL


OTHER FUNCTIONS
//
******************************************************************
******

void control :: edit_menu(void)


{
char ch ;
while (1)
{
clrscr() ;
shape s ;
s.box(10,5,71,21,219) ;
s.box(9,4,72,22,218) ;
textcolor(BLACK) ;
textbackground(WHITE) ;
gotoxy(34,10) ;
cprintf(" EDIT MENU ") ;
textcolor(LIGHTGRAY) ;
41

textbackground(1) ;
gotoxy(31,12) ;
cout <<"1: MODIFY ACCOUNT" ;
gotoxy(31,13) ;
cout <<"2: CLOSE ACCOUNT" ;
gotoxy(31,14) ;
cout <<"0: QUIT" ;
gotoxy(31,16) ;
cout <<"Enter your choice: " ;
ch = getche() ;
if (ch == 27)
break ;
else
if (ch == '1')
{
initial ini ;
ini.modify() ;
break ;
}
else
if (ch == '2')
{
account a ;
a.close_account() ;
break ;
}
else
if (ch == '0')
break ;
}
}

//**********************************************************
// CLASS CONTROL :: FUNCTION TO DISPLAY HELP ABOUT PROJECT
42

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

void control :: help(void)


{
clrscr() ;
shape s ;
s.box(2,1,79,25,218) ;
s.box(25,2,54,4,219) ;
textcolor(LIGHTBLUE+BLINK) ;
gotoxy(27,3); cprintf("WELCOME TO PROJECT BANKING") ;
delay(10) ;
gotoxy(10,5); cout <<" IN THIS PROJECT YOU CAN KEEP
RECORD FOR DAILY ";
delay(10) ;
gotoxy(10,6); cout <<"\t\tBANKING TRANSACTIONS. ";
delay(10) ;
gotoxy(10,8); cout <<" THIS PROGRAM IS CAPABLE OF HOLDING
ANY No. OF ACCOUNTS";
delay(10) ;
gotoxy(10,10); cout <<"1.) In the first option the account of a particular
person";
delay(10) ;
gotoxy(10,11); cout <<" is displayed by giving simply the account no. of
that person." ;
delay(10) ;
gotoxy(10,13); cout <<"2.) In second option you can see the list of all the
accounts." ;
delay(10) ;
gotoxy(10,15); cout <<"3.) Through third option you can do banking
transactions" ;
delay(10) ;
gotoxy(10,16); cout <<" (Deposit/Withdraw)." ;
delay(10) ;
gotoxy(10,18); cout <<"4.) In Fourth option you can open new account." ;
delay(10) ;
gotoxy(10,19); cout <<" (NOTE: Opening amount i.e. , the first deposit
should not be " ;
delay(10) ;
gotoxy(10,20); cout <<" less than Rs.500/-";
delay(10);
gotoxy(10,22); cout <<"5.) In Fifth option you can Modify or Delete any
account." ;
delay(10) ;
gotoxy(10,23); cout <<"6.) In sixth option the help menu is displayed ";
gotoxy(10,24); cout <<"0.) This is the last option i.e., Quit (Exit to Dos).
";
43

delay(10) ;
textcolor(RED+BLINK) ; textbackground(WHITE+BLINK) ;
gotoxy(26,25) ; cprintf(" Press a key to continue ") ;
textcolor(LIGHTGRAY) ; textbackground(BLACK) ;
gotoxy(25,2) ;
getch() ;
getch() ;
for (int i=25; i>=1; i--)
{
delay(20) ;
gotoxy(1,i) ; clreol() ;
}
}

//
******************************************************************
// CLASS INITIAL :: THIS FUNCTION RETURN LAST ACCOUNT NO. IN
THE FILE
// INITIAL.DAT
//
******************************************************************

int initial :: last_accno(void)


{
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
int count=0 ;
while (file.read((char *) this, sizeof(initial)))
count = accno ;
file.close() ;
return count ;
}

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

// CLASS INITIAL :: THIS FUNCTION RETURN RECORD NO. OF THE


GIVEN ACCOUNT NO.
// IN THE FILE INITIAL.DAT
//
******************************************************************
********
44

int initial :: recordno(int t_accno)


{
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
int count=0 ;
while (file.read((char *) this, sizeof(initial)))
{
count++ ;
if (t_accno == accno)
break ;
}
file.close() ;
return count ;
}

//
******************************************************************
****
// CLASS I NITIAL :: THIS FUNCTION DISPLAY THE ACCOUNT FOR
GIVEN ACCOUNT NO.
// FROM THE FILE INITIAL.DAT
//
******************************************************************
******

void initial :: display(int t_accno)


{
shape s ;
s.box(8,7,73,11,219) ;
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
while (file.read((char *) this, sizeof(initial)))
{
if (t_accno == accno)
{
textbackground(1);
gotoxy(8,5) ;
cout <<"ACCOUNT NO. " <<accno ;
gotoxy(10,8) ;
cout <<"Name : " <<name ;
gotoxy(10,9) ;
45

cout <<"Address : " <<address ;


gotoxy(10,10) ;
cout <<"Balance : " <<balance ;
break ;
}
}
file.close() ;}
//
******************************************************************
***

// CLASS INITIAL :: THIS FUNCTION RETURN NAME FOR THE GIVEN


ACCOUNT NO.
// IN THE FILE INITIAL.DAT
//
******************************************************************
***

char *initial :: return_name(int t_accno)


{
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
char t_name[30] ;
while (file.read((char *) this, sizeof(initial)))
{
if (accno == t_accno)
{
strcpy(t_name,name) ;
break ;
}
}
file.close() ;
return t_name ;
}

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

// CLASS INITIAL :: THIS FUNCTION RETURN ADDRESS FOR THE


GIVEN ACCOUNT NO.
// IN THE FILE INITIAL.DAT
46

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

char *initial :: return_address(int t_accno)


{
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
char t_address[60] ;
while (file.read((char *) this, sizeof(initial)))
{
if (accno == t_accno)
{
strcpy(t_address,address) ;
break ;
}
}
file.close() ;
return t_address ;
}

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

// CLASS INITIAL :: THIS FUNCTION RETURN BALANCE FOR THE


GIVEN ACCOUNT NO.
// IN THE FILE INITIAL.DAT
//
******************************************************************
******

float initial :: give_balance(int t_accno)


{
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
float t_balance ;
while (file.read((char *) this, sizeof(initial)))
{
if (accno == t_accno)
{
47

t_balance = balance ;
break ;
}
}
file.close() ;
return t_balance ;
}

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

// CLASS INITIAL :: THIS FUNCTION RETURN 1 IF THE GIVEN


ACCOUNT NO. FOUND
// IN THE FILE INITIAL.DAT
//
******************************************************************
****

int initial :: found_account(int t_accno)


{
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
int found=0 ;
while (file.read((char *) this, sizeof(initial)))
{
if (accno == t_accno)
{
found = 1 ;
break;
}
}
file.close() ;
return found ;
}
48

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

// CLASS INITIAL :: THIS FUNCTION DRAWS THE BOX FOR THE LIST
OF ACCOUNTS
//
******************************************************************
****

void initial :: box_for_list()


{
shape s ;
s.box(2,1,79,25,218) ;
s.line_hor(3,78,3,196) ;
s.line_hor(3,78,5,196) ;
s.line_hor(3,78,23,196) ;
textbackground(WHITE) ;
gotoxy(3,4) ;
for (int i=1; i<=76; i++) cprintf(" ") ;
textbackground(BLACK) ;
textcolor(WHITE) ; textbackground(WHITE) ;
gotoxy(4,4) ;
cprintf("ACCOUNT NO. NAME OF PERSON
BALANCE") ;
textcolor(LIGHTGRAY) ; textbackground(1) ;
int d1, m1, y1 ;
struct date d;
getdate(&d);
d1 = d.da_day ;
m1 = d.da_mon ;
y1 = d.da_year ;
gotoxy(4,2) ;
cout <<"Date: " <<d1 <<"/" <<m1 <<"/" <<y1 ;
}

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

// CLASS INITIAL :: THIS FUNCTION DISPLAYS THE LIST OF


ACCOUNTS IN FILE
// INITIAL.DAT
49

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

void initial :: display_list(void)


{
clrscr() ;
box_for_list() ;
int row=6, flag ;
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
while (file.read((char *) this, sizeof(initial)))
{
flag = 0 ;
delay(10) ;
gotoxy(7,row) ;
cout <<accno ;
gotoxy(25,row) ;
cout <<name ;
gotoxy(57,row) ;
cout <<balance ;
row++ ;
if (row == 23)
{
flag = 1 ;
row = 6 ;
gotoxy(4,24) ;
cout <<"Press any key to continue..." ;
getch() ;
clrscr() ;
box_for_list() ;
}
}
file.close() ;
if (!flag)
{
gotoxy(4,24) ;
cout <<"Press any key to continue..." ;
getch() ;
}
}

//
*****************************************************************
50

// CLASS INITIAL :: THIS FUNCTION ADDS THE GIVEN DATA INTO THE
FILE
// INITIAL.DAT
//
*****************************************************************

void initial :: add_to_file(int t_accno, char t_name[30], char


t_address[60], float t_balance)
{
accno = t_accno ;
strcpy(name,t_name) ;
strcpy(address,t_address) ;
balance = t_balance ;
fstream file ;
file.open("INITIAL.DAT", ios::out | ios::app|ios::binary) ;
file.write((char *) this, sizeof(initial)) ;
file.close() ;
}

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

// CLASS INITIAL :: THIS FUNCTION DELETES RECORD FOR THE


GIVEN ACOUNT NO.
// FROM THE FILE INITIAL.DAT
//
******************************************************************
****

void initial :: delete_account(int t_accno)


{
fstream file ;
file.open("INITIAL.DAT", ios::in|ios::binary) ;
fstream temp ;
temp.open("temp.dat", ios::out|ios::binary) ;
file.seekg(0,ios::beg) ;
while ( !file.eof() )
{
file.read((char *) this, sizeof(initial)) ;
if ( file.eof() )
break ;
if ( accno != t_accno )
temp.write((char *) this, sizeof(initial)) ;
51

}
file.close() ;
temp.close() ;
file.open("INITIAL.DAT", ios::out|ios::binary) ;
temp.open("temp.dat", ios::in|ios::binary) ;
temp.seekg(0,ios::beg) ;
while ( !temp.eof() )
{
temp.read((char *) this, sizeof(initial)) ;
if ( temp.eof() )
break ;
file.write((char *) this, sizeof(initial)) ;
}
file.close() ;
temp.close() ;
}

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

// CLASS INITIAL :: THIS FUNCTION UPDATE BALANCE FOR THE


GIVEN ACOUNT NO.
// IN THE FILE INITIAL.DAT
//
******************************************************************
****

void initial :: update_balance(int t_accno, float t_balance)


{
int recno ;
recno = recordno(t_accno) ;
fstream file ;
file.open("INITIAL.DAT", ios::out | ios::ate|ios::binary) ;
balance = t_balance ;
int location ;
location = (recno-1) * sizeof(initial) ;
file.seekp(location) ;
file.write((char *) this, sizeof(initial)) ;
file.close() ;
}
52

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

// CLASS INITIAL :: THIS FUNCTION MODIFIES THE RECORD FOR THE


GIVEN DATA
// IN THE FILE INITIAL.DAT
//
******************************************************************
****

void initial :: modify_account(int t_accno, char t_name[30], char


t_address[60])
{
int recno ;
recno = recordno(t_accno) ;
fstream file ;
file.open("INITIAL.DAT", ios::out | ios::ate|ios::binary) ;
strcpy(name,t_name) ;
strcpy(address,t_address) ;
int location ;
location = (recno-1) * sizeof(initial) ;
file.seekp(location) ;
file.write((char *) this, sizeof(initial)) ;
file.close() ;
}

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

//CLASS INITIAL :: THIS FUNCTION GIVE THE DATA TO MODIFY THE


RECORD IN THE
// FILE INITIAL.DAT
//
******************************************************************
****

void initial :: modify(void)


{
clrscr() ;
char t_acc[10] ;
int t, t_accno ;
53

textbackground(1);
gotoxy(100,100) ;
cout <<"PRESS (0) TO EXIT" ;
gotoxy(500,500) ;
cout <<"Enter the account no. " ;
gets(t_acc) ;
t = atoi(t_acc) ;
t_accno = t ;
if (t_accno == 0)
return ;
clrscr() ;
if (!found_account(t_accno))
{
gotoxy(5,5) ;
cout <<"\7Account not found" ;
getch() ;
return ;
}
shape s ;
s.box(2,2,79,24,218) ;
s.line_hor(3,78,4,196) ;
s.line_hor(3,78,22,196) ;
gotoxy(1,1) ;
cout <<"PRESS (0) TO EXIT" ;
textbackground(WHITE) ;
gotoxy(3,3) ;
for (int i=1; i<=76; i++) cprintf(" ") ;
textbackground(BLACK) ;
textcolor(BLACK+BLINK) ; textbackground(WHITE) ;
gotoxy(30,3) ;
cprintf("MODIFY ACCOUNT SCREEN") ;
textcolor(LIGHTGRAY) ; textbackground(1) ;
int d1, m1, y1 ;
struct date d;
getdate(&d); //Inbuilt function to display current
d1 = d.da_day ; //date of the system
m1 = d.da_mon ;
y1 = d.da_year ;
gotoxy(62,5) ;
cout <<"Date: "<<d1
<<"/" <<m1 <<"/" <<y1 ;
char ch ;
display(t_accno) ;
account a ;
do
{
54

a.clear(5,13) ;
gotoxy(5,13) ;
cout <<"Modify this account (y/n): " ;
ch = getche() ;
if (ch == '0')
return ;
ch = toupper(ch) ;
} while (ch != 'N' && ch != 'Y') ;
if (ch == 'N')
return ;
int modified=0, valid ;
char t_name[30], t_address[60] ;
gotoxy(5,15) ;
cout <<"Name : " ;
gotoxy(5,16) ;
cout <<"Address : " ;
do
{
a.clear(15,15) ;
a.clear(5,23) ;
gotoxy(5,23) ;
cout <<"ENTER NAME or PRESS <ENTER> FOR NO
CHANGE" ;
valid = 1 ;
gotoxy(15,15) ;
gets(t_name) ;
strupr(t_name) ;
if (t_name[0] == '0')
return ;
if (strlen(t_name) > 25)
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7NAME SHOULD NOT BE GREATER THAN
25") ;
getch() ;
}
} while (!valid) ;
if (strlen(t_name) > 0)
modified = 1 ;
do
{
a.clear(15,16) ;
a.clear(5,23) ;
gotoxy(5,23) ;
55

cout <<"ENTER ADDRESS or PRESS <ENTER> FOR NO


CHANGE" ;
valid = 1;
gotoxy(15,16) ;
gets(t_address) ;
strupr(t_address) ;
if (t_address[0] == '0')
return ;
if (strlen(t_address) > 55)
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7SHOULD NOT BE BLANK OR GREATER
THAN 55") ;
getch() ;
}
} while (!valid) ;
if (strlen(t_address) > 0)
modified = 1 ;
if (!modified)
return ;
a.clear(5,23) ;
do
{
a.clear(5,18) ;
gotoxy(5,18) ;
cout <<"Do you want to save changes (y/n): " ;
ch = getche() ;
if (ch == '0')
return ;
ch = toupper(ch) ;
} while (ch != 'N' && ch != 'Y') ;
if (ch == 'N')
return ;
modify_account(t_accno,t_name,t_address) ;
gotoxy(5,21) ;
cout <<"\7Record Modified" ;
gotoxy(5,23) ;
cout <<"press a key to continue..." ;
getch() ;
}

//****************************************************************
// CLASS ACCOUNT :: THIS FUNCTION CLEAR THE GIVEN ROW AND
COLUMNS
56

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

void account :: clear(int col, int row)


{
for (int i=col; i<=78; i++)
{
gotoxy(i,row) ;
cout <<" " ;
}
}

//
*****************************************************************
// CLASS ACCOUNT :: THIS FUNCTION ADDS THE GIVEN DATA INTO
THE FILE
// BANKING.DAT
//
*****************************************************************

void account :: add_to_file(int t_accno, int d1, int m1, int y1, char
t_tran, char t_type[10], float t_interest, float t_amount, float
t_balance)
{
fstream file ;
file.open("BANKING.DAT", ios::app|ios::binary) ;
accno = t_accno ;
dd = d1 ;
mm = m1 ;
yy = y1 ;
tran = t_tran ;
strcpy(type,t_type) ;
interest = t_interest ;
amount = t_amount ;
balance = t_balance ;
file.write((char *) this, sizeof(account)) ;
file.close() ;
}

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

// CLASS ACCOUNT :: THIS FUNCTION DELETES THE RECORD FOR


GIVIN ACCOUNT NO.
57

// FROM FILE BANKING.DAT


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

void account :: delete_account(int t_accno)


{
fstream file ;
file.open("BANKING.DAT", ios::in|ios::binary) ;
fstream temp ;
temp.open("temp.dat", ios::out|ios::binary) ;
file.seekg(0,ios::beg) ;
while ( !file.eof() )
{
file.read((char *) this, sizeof(account)) ;
if ( file.eof() )
break ;
if ( accno != t_accno )
temp.write((char *) this, sizeof(account)) ;
}
file.close() ;
temp.close() ;
file.open("BANKING.DAT", ios::out|ios::binary) ;
temp.open("temp.dat", ios::in|ios::binary) ;
temp.seekg(0,ios::beg) ;
while ( !temp.eof() )
{
temp.read((char *) this, sizeof(account)) ;
if ( temp.eof() )
break ;
file.write((char *) this, sizeof(account)) ;
}
file.close() ;
temp.close() ;
}

//**********************************************************
// THIS FUNCTION ACCEPTS THE DATA TO ADD RECORDS IN THE
// FILE BANKING.DAT
//**********************************************************

void account :: new_account(void)


{
char ch ;
58

int i, valid ;
clrscr() ;
initial ini ;
shape s ;
s.box(2,2,79,24,218) ;
s.line_hor(3,78,4,196) ;
s.line_hor(3,78,22,196) ;
gotoxy(71,1) ;
cout <<"<0>=Exit" ;
textbackground(WHITE) ;
gotoxy(3,3) ;
for (i=1; i<=76; i++) cprintf(" ") ;
textbackground(BLACK) ;
textcolor(BLACK+BLINK) ; textbackground(WHITE) ;
gotoxy(32,3) ;
cprintf("OPEN NEW ACCOUNT") ;
textcolor(LIGHTGRAY) ; textbackground(1) ;

int d1, m1, y1 ;


struct date d;
getdate(&d);
d1 = d.da_day ;
m1 = d.da_mon ;
y1 = d.da_year ;
int t_accno ;
t_accno = ini.last_accno() ;
t_accno++ ;
if (t_accno == 1)
{
ini.add_to_file(t_accno,"abc","xyz",1.1) ;
ini.delete_account(t_accno) ;
add_to_file(t_accno,1,1,1997,'D',"INITIAL",1.1,1.1,1.1) ;
delete_account(t_accno) ;
}
char t_name[30], t[10], t_address[60] ;
float t_bal=0.0, t_balance=0.0 ;

gotoxy(5,6) ;
cout <<"Date : "<<d1<<"/" <<m1 <<"/" <<y1 ;
gotoxy(5,8) ;
cout <<"Account no. # " <<t_accno ;
gotoxy(5,10) ;
cout <<"Name : " ;
gotoxy(5,11) ;
cout <<"Address : " ;
gotoxy(5,12) ;
59

cout <<"Name of Verifying person : " ;


gotoxy(5,14) ;
cout <<"Initial Deposit : " ;
do
{
clear(15,10) ;
clear(5,23) ;
gotoxy(5,23) ;
cout <<"ENTER NAME OF THE PERSON" ;
valid = 1 ;
gotoxy(15,10) ;
gets(t_name) ;
strupr(t_name) ;
if (t_name[0] == '0')
return ;
if (strlen(t_name) == 0 || strlen(t_name) > 25)
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7NAME SHOULD NOT BE BLANK OR
GREATER THAN 25") ;
getch() ;
}
} while (!valid) ;
do
{
clear(15,11) ;
clear(5,23) ;
gotoxy(5,23) ;
cout <<"ENTER ADDRESS OF THE PERSON" ;
valid = 1 ;
gotoxy(15,11) ;
gets(t_address) ;
strupr(t_address) ;
if (t_address[0] == '0')
return ;
if (strlen(t_address) == 0 || strlen(t_address) > 55)
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7SHOULD NOT BLANK OR GREATER THAN
55") ;
getch() ;
}
} while (!valid) ;
do
60

{
char vari[30] ;
clear(31,12) ;
clear(5,23) ;
gotoxy(5,23) ;
cout <<"ENTER NAME OF THE VERIFING PERSON" ;
valid = 1 ;
gotoxy(31,12) ;
gets(vari) ;
strupr(vari) ;
if (vari[0] == '0')
return ;
if (strlen(vari) == 0 || strlen(vari) > 25)
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7SHOULD NOT BLANK OR GREATER THAN
25") ;
getch() ;
}
} while (!valid) ;
do
{
clear(23,14) ;
clear(5,23) ;
gotoxy(5,23) ;
cout <<"ENTER INITIAL AMOUNT TO BE DEPOSIT" ;
valid = 1 ;
gotoxy(23,14) ;
gets(t) ;
t_bal = atof(t) ;
t_balance = t_bal ;
if (t[0] == '0')
return ;
if (t_balance < 500)
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7SHOULD NOT LESS THAN 500 ") ;
getch() ;
}
} while (!valid) ;
clear(5,23) ;
do
{
clear(5,17) ;
61

valid = 1 ;
gotoxy(5,17) ;
cout <<"Do you want to save the record (y/n) : " ;
ch = getche() ;
if (ch == '0')
return ;
ch = toupper(ch) ;
} while (ch != 'N' && ch != 'Y') ;
if (ch == 'N')
return ;
float t_amount, t_interest ;
t_amount = t_balance ;
t_interest = 0.0 ;
char t_tran, t_type[10] ;
t_tran = 'D' ;
strcpy(t_type,"INITIAL") ;
ini.add_to_file(t_accno,t_name,t_address,t_balance) ;

add_to_file(t_accno,d1,m1,y1,t_tran,t_type,t_interest,t_amount,t_balance)
;
}

//**********************************************************
// THIS FUNCTION DRAWS THE BOX FOR DISPLAYING RECORD FROM
// FILE BANKING.DAT
//**********************************************************

void account :: box_for_display(int t_accno)


{
shape s ;
s.box(2,1,79,25,218) ;
s.line_hor(3,78,4,196) ;
s.line_hor(3,78,6,196) ;
s.line_hor(3,78,23,196) ;
textbackground(WHITE) ;
gotoxy(3,5) ;
for (int i=1; i<=76; i++) cprintf(" ") ;
textbackground(BLACK) ;
textcolor(BLACK) ; textbackground(WHITE) ;
gotoxy(4,5) ;
cprintf("DATE PARTICULAR DEPOSIT WITHDRAW
INTEREST BALANCE") ;
textcolor(15) ; textbackground(1) ;
62

int d1, m1, y1 ;


struct date d;
getdate(&d);
d1 = d.da_day ;
m1 = d.da_mon ;
y1 = d.da_year ;
gotoxy(63,2) ;
cout <<"Date: " <<d1<<"/" <<m1 <<"/" <<y1 ;
gotoxy(4,2) ;
cout <<"Account no. " <<t_accno ;
initial ini ;
char t_name[30] ;
strcpy(t_name,ini.return_name(t_accno)) ;
char t_address[60] ;
strcpy(t_address,ini.return_address(t_accno)) ;
gotoxy(25,2) ;
cout <<t_name ;
gotoxy(25,3) ;
cout <<t_address ;
}

//**********************************************************
// THIS FUNCTION DISPLAY RECORD FROM THE FILE BANKING.DAT
//**********************************************************

void account :: display_account(void)


{
clrscr() ;
char t_acc[10] ;
int t, t_accno ;
textbackground(1);
gotoxy(1,1) ;
cout <<"PRESS (0) TO EXIT" ;
gotoxy(5,5) ;
cout <<"Enter the account no. " ;
gets(t_acc) ;
t = atoi(t_acc) ;
t_accno = t ;
if (t_accno == 0)
return ;
clrscr() ;
initial ini ;
if (!ini.found_account(t_accno))
{
gotoxy(5,5) ;
63

cout <<"\7Account not found" ;


getch() ;
return ;
}
box_for_display(t_accno) ;
int row=7, flag = 0 ;
fstream file ;
file.open("BANKING.DAT", ios::in|ios::binary) ;
while (file.read((char *) this, sizeof(account)))
{
if (accno == t_accno)
{
flag = 0 ;
delay(10) ;
gotoxy(4,row) ;
cout <<dd <<"/"<<mm <<"/" <<yy ;
gotoxy(16,row) ;
cout <<type ;
if (tran == 'D')
gotoxy(30,row) ;
else
gotoxy(42,row) ;
cout <<long(amount*100)/100.0 ;
gotoxy(56,row) ;
cout <<long(interest*100)/100.0 ;
gotoxy(66,row) ;
cout <<long(balance*100)/100.0 ;
row++ ;
if (row == 23)
{
flag = 1 ;
row = 7 ;
gotoxy(4,24) ;
cout <<"press a key to continue..." ;
getch() ;
clrscr() ;
box_for_display(t_accno) ;
}
}
}
file.close() ;
if (!flag)
{
gotoxy(4,24) ;
cout <<"press a key to continue..." ;
getch() ;
64

}
}

//**********************************************************
// THIS FUNCTION RETURNS THE DIFFERENCE BETWEEN 2 DATES.
//**********************************************************

int account :: no_of_days(int d1, int m1, int y1, int d2, int m2, int
y2)
{
static int month[] = {31,28,31,30,31,30,31,31,30,31,30,31} ;
int days = 0 ;
while (d1 != d2 || m1 != m2 || y1 != y2)
{
days++ ;
d1++ ;
if (d1 > month[m1-1])
{
d1 = 1 ;
m1++ ;
}
if (m1 > 12)
{
m1 = 1 ;
y1++ ;
}
}
return days ;
}

//**********************************************************
// THIS FUNCTION CALCULATES INTEREST.
//**********************************************************

float account :: calculate_interest(int t_accno, float t_balance)


{
fstream file ;
file.open("BANKING.DAT", ios::in|ios::binary) ;
file.seekg(0,ios::beg) ;
int d1, m1, y1, days ;
while (file.read((char *) this, sizeof(account)))
{
if (accno == t_accno)
{
65

d1 = dd ;
m1 = mm ;
y1 = yy ;
break ;
}
}
int d2, m2, y2 ;
struct date d;
getdate(&d);
d2 = d.da_day ;
m2 = d.da_mon ;
y2 = d.da_year ;
float t_interest=0.0 ;
if ((y2<y1) || (y2==y1 && m2<m1) || (y2==y1 && m2==m1
&& d2<d1))
return t_interest ;
days = no_of_days(d1,m1,y1,d2,m2,y2) ;
int months=0 ;
if (days >= 30)
{
months = days/30 ;
t_interest = ((t_balance*2)/100) * months ;
}
file.close() ;
return t_interest ;
}

//**********************************************************
// THIS FUNCTION MAKES TRANSACTIONS (DEPOSIT/WITHDRAW).
//**********************************************************

void account :: transaction(void)


{
clrscr() ;
char t_acc[10] ;
int t, t_accno, valid ;
textbackground(1);
gotoxy(1,1) ;
cout <<"PRESS (0) TO EXIT" ;
gotoxy(5,5) ;
cout <<"Enter the account no. " ;
gets(t_acc) ;
t = atoi(t_acc) ;
t_accno = t ;
if (t_accno == 0)
66

return ;
clrscr() ;
initial ini ;
if (!ini.found_account(t_accno))
{
gotoxy(5,5) ;
cout <<"\7Account not found" ;
getch() ;
return ;
}
shape s ;
s.box(2,2,79,24,218) ;
s.line_hor(3,78,4,196) ;
s.line_hor(3,78,22,196) ;
gotoxy(1,1) ;
cout <<"PRESS (0) TO EXIT" ;
textbackground(WHITE) ;
gotoxy(3,3) ;
for (int i=1; i<=76; i++) cprintf(" ") ;
textbackground(BLACK) ;
textcolor(BLACK+BLINK) ; textbackground(WHITE) ;
gotoxy(29,3) ;
cprintf("TRANSACTION IN ACCOUNT") ;
textcolor(LIGHTGRAY) ; textbackground(1) ;
int d1, m1, y1 ;
struct date d;
getdate(&d);
d1 = d.da_day ;
m1 = d.da_mon ;
y1 = d.da_year ;
gotoxy(5,6) ;
cout <<"Date : "<<d1
<<"/" <<m1 <<"/" <<y1 ;
gotoxy(5,8) ;
cout <<"Account no. # " <<t_accno ;
char t_name[30] ;
char t_address[60] ;
float t_balance ;
strcpy(t_name,ini.return_name(t_accno)) ;
strcpy(t_address,ini.return_address(t_accno)) ;
t_balance = ini.give_balance(t_accno) ;
s.box(25,10,75,13,218) ;
gotoxy(27,11) ;
cout <<"Name : " <<t_name ;
gotoxy(27,12) ;
cout <<"Address: " <<t_address ;
67

gotoxy(5,15) ;
cout <<"Last Balance : Rs." <<t_balance ;
char t_tran, t_type[10], tm[10] ;
float t_amount, t_amt ;
do
{
clear(5,18) ;
valid = 1 ;
gotoxy(5,18) ;
cout <<"Deposit or Withdraw (D/W) : " ;
t_tran = getche() ;
if (t_tran == '0')
return ;
t_tran = toupper(t_tran) ;
} while (t_tran != 'D' && t_tran != 'W') ;
do
{
clear(5,19) ;
clear(5,23) ;
gotoxy(5,23) ;
cout <<"ENTER TRANSACTION BY CASH OR CHEQUE" ;
valid = 1 ;
gotoxy(5,19) ;
cout <<"(Cash/Cheque) : " ;
gets(t_type) ;
strupr(t_type) ;
if (t_type[0] == '0')
return ;
if (strcmp(t_type,"CASH") &&
strcmp(t_type,"CHEQUE"))
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7ENTER CORRECTLY ") ;
getch() ;
}
} while (!valid) ;
do
{
clear(5,21) ;
clear(5,23) ;
gotoxy(5,23) ;
cout <<"ENTER AMOUNT FOR TRANSACTION" ;
valid = 1 ;
gotoxy(5,21) ;
cout <<"Amount : Rs." ;
68

gets(tm) ;
t_amt = atof(tm) ;
t_amount = t_amt ;
if (tm[0] == '0')
return ;
if ((t_tran == 'W' && t_amount > t_balance) || (t_amount < 1))
{
valid = 0 ;
gotoxy(5,23) ;
cprintf("\7INVALID DATA ENTERED ") ;
getch() ;
}
} while (!valid) ;
char ch ;
clear(5,23) ;
do
{
clear(40,20) ;
valid = 1 ;
gotoxy(40,20) ;
cout <<"Save transaction (y/n): " ;
ch = getche() ;
if (ch == '0')
return ;
ch = toupper(ch) ;
} while (ch != 'N' && ch != 'Y') ;
if (ch == 'N')
return ;
float t_interest ;
t_interest = calculate_interest(t_accno,t_balance) ;
if (t_tran == 'D')
t_balance = t_balance + t_amount + t_interest ;
else
t_balance = (t_balance - t_amount) + t_interest ;
ini.update_balance(t_accno,t_balance) ;

add_to_file(t_accno,d1,m1,y1,t_tran,t_type,t_interest,t_amount,t_balance);
}

//**********************************************************
// THIS FUNCTION CLOSE THE ACCOUNT (DELETE ACCOUNT).
//**********************************************************

void account :: close_account(void)


69

{
clrscr() ;
char t_acc[10] ;
int t, t_accno ;
textbackground(1);
gotoxy(1,1) ;
cout <<"PRESS (0) TO EXIT" ;
gotoxy(5,5) ;
cout <<"Enter the account no. " ;
gets(t_acc) ;
t = atoi(t_acc) ;
t_accno = t ;
if (t_accno == 0)
return ;
clrscr() ;
initial ini ;
if (!ini.found_account(t_accno))
{
gotoxy(5,5) ;
cout <<"\7Account not found" ;
getch() ;
return ;
}
shape s ;
s.box(2,2,79,24,218) ;
s.line_hor(3,78,4,196) ;
s.line_hor(3,78,22,196) ;
gotoxy(1,1) ;
cout <<"PRESS (0) TO EXIT" ;
textbackground(WHITE) ;
gotoxy(3,3) ;
for (int i=1; i<=76; i++) cprintf(" ") ;
textbackground(BLACK) ;
textcolor(BLACK+BLINK) ; textbackground(WHITE) ;
gotoxy(30,3) ;
cprintf("CLOSE ACCOUNT SCREEN") ;
textcolor(LIGHTGRAY) ; textbackground(1) ;
int d1, m1, y1 ;
struct date d;
getdate(&d);
d1 = d.da_day ;
m1 = d.da_mon ;
y1 = d.da_year ;
gotoxy(62,5) ;
cout <<"Date: "<<d1<<"/" <<m1 <<"/" <<y1 ;
char ch ;
70

ini.display(t_accno) ;
do
{
clear(5,15) ;
gotoxy(5,15) ;
cout <<"Close this account (y/n): " ;
ch = getche() ;
if (ch == '0')
return ;
ch = toupper(ch) ;
} while (ch != 'N' && ch != 'Y') ;
if (ch == 'N')
return ;
ini.delete_account(t_accno) ;
delete_account(t_accno) ;
gotoxy(5,20) ;
cout <<"\7Record Deleted" ;
gotoxy(5,23) ;
cout <<"press a key to continue..." ;
getch() ;
}

//************************************************************
// THIS IS MAIN FUNCTION CALLING HELP AND MAIN MENU
FUNCTIONS
//************************************************************

void main(void) //Main segment


{
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, "..\\bgi");
gra1();
gra2();
control c ;
c.help() ;
c.main_menu() ;
}

//*************************************************************
// INDIVIDUAL FUNCTION DEFINITIONS
//*************************************************************
void gra1() //Function definition #1
{
clrscr();
int gdriver=DETECT,gmode,errorcode,c1x,c2x,c3x,c4x,c5x,c6x;
71

int c1y,c2y,c3y,c4y,c5y,c6y;
c1x=c2x=270;
c3x=c4x=370;
c5x=220;c6x=420;
c1y=c3y=20;
c2y=c4y=120;
c5y=c6y=70;
initgraph (&gdriver, &gmode," c:\\tc");

setcolor(4);
line(c1x,c1y,c2x,c2y);
line(c1x,c1y,c3x,c3y);
line(c1x,c1y,c4x,c4y);
line(c2x,c2y,c3x,c3y);
line(c2x,c2y,c4x,c4y);
line(c3x,c3y,c4x,c4y);
line(c1x,c1y,c5x,c5y);
line(c5x,c5y,c2x,c2y);
line(c3x,c3y,c6x,c6y);
line(c4x,c4y,c6x,c6y); //DRAW THE LOGO OF HSBC
setfillstyle(1,4);
floodfill(320,72,4);
floodfill(320,68,4);
floodfill(240,70,4);
floodfill(400,70,4);
setfillstyle(1,15);
floodfill(300,70,4);
floodfill(340,70,4);

setcolor(15);
outtextxy(230,200,"H");
outtextxy(290,200,"S"); //TO WRITE HSBC
outtextxy(350,200,"B");
outtextxy(410,200,"C");

setcolor(15);
line (320-150,320-13,320+150,320-13);
line (320-150,320+12,320+150,320+12); //TO CREATE THE LOADING
BOX
line (320-150,320-13,320-150,320+12);
line (320+150,320+12,320+150,320-13);
int s=10,w;

outtextxy(150,365,"L");
outtextxy(160,365,"O");
outtextxy(170,365,"A");
72

outtextxy(180,365,"D");
outtextxy(190,365,"I");
outtextxy(200,365,"N");
outtextxy(210,365,"G");
outtextxy(220,365,".");
outtextxy(230,365,".");
outtextxy(240,365,".");
outtextxy(250,365,".");

for (int x1=171,x2=171,y1=308,y2=331,y=1,S=0;x1<470;x1++,x2++,y+


+,S++)
{
setcolor(4);
line (x1,y1,x2,y2);
w=(x1-169)/3;
gotoxy(60,23);setbkcolor(0);cout<<w<<"%";
if (x2>270) s=15; if (x2>370) s=10;
if (x2==320) delay(10); else
delay(s);
}
delay(800);
for (int i=27; i<=78; i++)
{
gotoxy(i,23) ;
cout <<" " ;
}
cleardevice();
}
void gra2() //Function definition *2
{
clrscr(); //To make a designer ellipse
int gd=DETECT,gm;
initgraph(&gd, &gm, "c:\\tc");
setcolor(8);
ellipse(320,240,0,360,300,150);
settextstyle(10,0,1);
settextjustify(1,1);
setcolor(5);
outtextxy(320,170,"PROJECT BANKING");
delay(25);
settextstyle(4,0,1);
setcolor(20);
outtextxy(320,220,"Designed By:");
delay(25);
outtextxy(320,350,"I G N O U ");
73

settextstyle(4,0,1);
setcolor(3);
delay(25);
outtextxy(320,280,"ARCHANA PANDA");
outtextxy(320,295,"AMIT KUMAR HOTA");
outtextxy(320,305,"SUBRAT KUMAR MOHAPATRA");
outtextxy(320,320,"SRINIVAS RAO PINNINTI");
for (int stangle=0;!kbhit();stangle++)
{ setcolor(15);
ellipse(320,240,stangle,stangle+20,300,150);
ellipse(320,240,stangle+180,stangle+200,300,150);
delay(6);
setcolor(8);
ellipse(320,240,stangle-1,stangle+19,300,150);
ellipse(320,240,stangle-1+180,stangle+199,300,150); }
closegraph();}
// ***** END OF THE PROGRAM *****

5.3 Code Efficiency


All these source code successfully complied and executed. For these purpose we
produce several project windows as an example.

5.4 Testing Approach

The goal of testing is to locate system errors before installation these system
errors can take different forms including the coding errors that reduce system
efficiency. For this reason the HSBC team project members designed a systematic
testing procedure that covers all functions, even the ones that are certain to work.
The following are the testing approaches used by the team:
5.4.1 Black box testing
5.4.2 White box testing
5.4.3 User interface testing
5.4.4 Use scenario testing
5.4.5 Security testing
74

5.4.1 Black box testing

The test was based on checking the requirements stated on the system
request in the first milestone of the project. The team crosschecked the fully
developed product with functionality stated in the system request document and is
proud to announce that it has completed all the promised features (except the few
mentioned and discussed with the client by the members of the team).The
products developed include the four different bank accounts equipped with update
and add features for each one of them. The team has also ensured a secure login
with user name and password features .The tests conducted by the team members
on the functionality of the products were successful.

5.4.2 White box testing

The code for the interactive products is coded in visual-basic andASP.net.


The programmers of the project team added comments to the processes performed
by the system. This is done for future readability and a guide line for the code.
The coding for the interface follows the formal coding standard and has been
reviewed by the members of the team. The system analyst and the programmers
have conducted several sessions of “code walk-through” to avoid errors. Thus the
team is proud to say this part of program testing was completed successfully.

5.4.3 User interface testing

The user interface testing includes the following subcategories identified


by the team:
3.1 The three click rule testing
3.2 The two click rule testing
3.3 Loading time testing
3.4 Query time testing
3.5 Query results testing
3.6 Product Headings
3.7 Aesthetics /consistency testing
3.8 Format Testing
3.9 User experience testing

5.4.4Use scenario testing


75

The use scenario testing includes the following subcategories defined by


the team:
4.1 Testing results for appropriate data
4.2 Testing results for different data format
4.3 Testing results for inappropriate data
4.4 Testing results for unfilled data fields
4.5 Testing links for different areas.

5.5 Modifications and Improvements:

All the source code and the algorithm give the desired output. Only few syntax
errors were found while testing of the project. Which are rectified.

CHAPTER 6
Results and Discussion

Test Reports

Individual account Information

Account no. 3 Archana Panda Date:


11/04/2010
BGH

DATE PARTICULAR DEPOSIT WITHDRAW INTEREST


BALANCE
76

5/3/2010 INITIAL 1000 0


1000
6/3/2010 CASH 1000 0
2000

ACCOUNT LIST

Date: 11/4/2010

ACCOUNT NO. NAME OF PERSON BALANCE

1 Archana Panda 2000


2 Subrat Kumar Mohapatra 2000
3 Srinivas Rao Pinniniti 2000
4 Amit Kumar Hota 2000

press any key to continue…


77

6.1 User Documantations:

6.1.1 Documentation for CUI Operating System (DOS)

The steps required to load and run the Banking Management System in DOS
mode is given below.

1. Insert the CD into the CD-ROM drive.


2. In command mode choose the CD-Rom drive by typing
CD-Rom drive letter followed by a colon.
3. Then enter in to the Sub folder BIN in folder TC.
4. Then type BANK.EXE and press the enter key.
5. After pressing the enter key the Banking Management
System Will run automatically.
6. To stop the program simply chooses the exit option or press
the Esc key twice.

6.1.2 Documentation for windows Operating System

Insert disk into CD ROM drive. Open the TC folder and then open the subfolder
BIN and then double-click on BANK.EXE icon. The software will start
execution.

CHAPTER 7

Conclusions

It is concluded from the above project that the “BANKING


MANAGEMENT SYSTEM” helps in efficient working of various objects
78

like Accounts, Account Holders, Transactions provided by the System etc.


in proving better services to the Costomers through the medium of
information where the dynamic information regarding the Bank can be
displayed.

Limitations of the System

 The program is single user oriented.

 Online transactions are not possible.

 Not optimized for use on networks.

Future Scope of the Project

 Multi-user System

 Online transactions can be possible.

 Optimized for use on networks.

REFERENCES

1.The Complete Reference C++, Fourth Edition Herbert Schildt


79

2. Programming with C, Schaum’s Outline Series

3. Turbo C/C++, Robert Lafore

You might also like