Project 15
Project 15
CHAPTER-1:
INTRODUCTION
1.1Background
1.2Objectives
1.3.1 Purpose
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
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
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
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
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
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
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
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.
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%
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 second option you can see the list of all the accounts.
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
Yes
Comma
nd stop
= Quit
No
No
User
Comma
command= permit user
nd=inter
deposit report
est entry
entry
Yes
Start
Create Account No
Validation
Is Empty Form
Inser
t
yes
No
Save Is
Error Sav
e
no
17
Start
Validation
Is
Inser
t Empty Form
No Save Is
no
error Save
yes
18
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
Government
R.B.I
19
BANK
CLERK
Cash
Deposit form check,account
verifying no, client info ,
authentication
ACCOUNT
SECTION
20
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
CHAPTER 4
System Design
4.1DESIGN OBJECTIVES:-
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
Welcome Screen:
CHAPTER 5
Implementation and Testing
5.1Testing
#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) ;
//**********************************************************
// 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
//**********************************************************
//**********************************************************
// CLASS SHAPE :: FUNCTION TO DRAW VERTICAL LINE
//**********************************************************
//**********************************************************
// 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
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
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);
}
//
******************************************************************
******
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
//**********************************************************
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
//
******************************************************************
//
******************************************************************
********
//
******************************************************************
****
// CLASS I NITIAL :: THIS FUNCTION DISPLAY THE ACCOUNT FOR
GIVEN ACCOUNT NO.
// FROM THE FILE INITIAL.DAT
//
******************************************************************
******
//
******************************************************************
******
//
******************************************************************
******
//
******************************************************************
******
t_balance = balance ;
break ;
}
}
file.close() ;
return t_balance ;
}
//
******************************************************************
****
//
******************************************************************
****
// CLASS INITIAL :: THIS FUNCTION DRAWS THE BOX FOR THE LIST
OF ACCOUNTS
//
******************************************************************
****
//
******************************************************************
****
//
******************************************************************
****
//
*****************************************************************
50
// CLASS INITIAL :: THIS FUNCTION ADDS THE GIVEN DATA INTO THE
FILE
// INITIAL.DAT
//
*****************************************************************
//
******************************************************************
****
}
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() ;
}
//
******************************************************************
****
//
******************************************************************
****
//
******************************************************************
****
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
//****************************************************************
// CLASS ACCOUNT :: THIS FUNCTION CLEAR THE GIVEN ROW AND
COLUMNS
56
//****************************************************************
//
*****************************************************************
// 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() ;
}
//
******************************************************************
********
//**********************************************************
// THIS FUNCTION ACCEPTS THE DATA TO ADD RECORDS IN THE
// FILE BANKING.DAT
//**********************************************************
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) ;
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
{
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
//**********************************************************
//**********************************************************
// THIS FUNCTION DISPLAY RECORD FROM THE FILE BANKING.DAT
//**********************************************************
}
}
//**********************************************************
// 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.
//**********************************************************
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).
//**********************************************************
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).
//**********************************************************
{
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
//************************************************************
//*************************************************************
// 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,".");
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 *****
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
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.
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
ACCOUNT LIST
Date: 11/4/2010
The steps required to load and run the Banking Management System in DOS
mode is given below.
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
Multi-user System
REFERENCES