You are on page 1of 99

BANKING SYSTEM

CONTENTS
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. INTRODUCTION OBJECTIVE AND SCOPE OF PROJECT THEORETICAL BACKGROUND PROBLEM DEFINITION SYSTEM PLANNING PERT CHART SYSTEM IMPLEMENTATION DETAILS OF HARDWARE & SOFTWARE COST AND BENEFIT ANALYSIS SYSTEM DEVELOPMENT LIFE CYCLE (SDLC) CODING OF BANKING PROJECT INPUT AND OUTPUT SCREEN ERD (ENTITY RELATION DIAGRAM) CONTEXT DIAGRAM DATA FLOW DIAGRAM (DFD) FLOW CHARTS DATA DICTIONARY REQUIREMENT ANALYSIS TESTING COMPLETE STRUCTURE OF THE PROGRAM PLATEFORM USED CLASS DIAGRAM BIBLIOGRAPHY REFERENCES WEBSITE
1

BANKING SYSTEM

ACKNOWLEDEGEMENT
We express our deep sense of gratitude to our project supervisor for his expert guidance, Stimulating discussions as well as continued impetus through out the period of this project. We also express our sincere thinks to my friend for their encouraging solicited advice an all kind of help extended during the period of this project. Certainly this project could not have completed without guidance and moral support from other staff member of the study center. Last but not least we are thankful to our center Manager Mr. S.P.GOSWAMI for his moral support for this project and we are thankful to faculties MR. RAJIV RAI for their expert guidance. Finally we are thankful to our all other well wisher and those people who are directly or indirectly related with this project for their valuable and precious help during this project.

Grouped By RAJESH KUMAR


A LEVEL REG.NO. - 465607 DGPIIT, BALLIA

BANKING SYSTEM

INTRODUCTION
BANKING SYSTEM The banking system is packages which manage the accounts of the customer in the bank electronically. This system provides the facility to open a new account for customer, the detail of the particular account no, the list of all customer in the bank, transaction on particular account no, modification of details on the particular accont no. These task should be perfomed by the option in the main menu as: 1. see account 2. list of account 3. transaction 4. open a new accont 5. edit account and in the project 2.different files used to manage the complete system.

BANKING SYSTEM

OBJECTIVE OF THE PROJECT


The main objective of the projectbankingis to make the efficient transaction of the particular account no. in the organization/groups association and any banking system through smooth, devoid of haziness as well as user friendly by making it a single window system. The objective to develop the software are: 1.AUTOMATED SYSTEM FOR TRACK RECORD. This activity includes all the information about customer such as name, address, deposit etc. 2.AUTOMATED SYSTEM FOR GENERATE REPORTS. In a menu there is all the related task is categorize.as for listing of all the customer of bank, details of particular account no, open a new accont etc. 3.AUTOMATED SYSTEM FOR MODIFY THE RECORDS. Thie activity involves the editing & deleting any record of customer. It takes care of the old and new cutomer at any instances if any information is changed. 4. It provides help of the project on menu option .6.

BANKING SYSTEM

THEORETICAL BACKGROUND
C++ is an object oriented programming (OOP) language. The objectoriented technique offers a way to write better programs. In earlier days, procedural programmings were used for expansion of algorithm, and now it is being replaced by object-oriented programming. In OOP first we think about the object and its purpose and behavior. Hence we select our tools and procedures. This solution fits the problem. In OOP a program is designed around the data being operated upon rather then upon the operation them. The basic idea behind object-oriented language is to combine data and functions into a single unit. This unit is called OBJECT. An object functions, calls member functions in C++, which provide only way to access data. The data in object is hidden from outside it so it cant be accidentally altered by outside functions. OOP does not allow data to flow freely around the system. A C++ program typically consists of a number of objects, which communicate with each other by calling anothers member functions.

Characteristics of object oriented language:

BANKING SYSTEM

Object oriented programming uses some new term, which are unfamiliar to procedural programming. These terms are as-

Objects: Object is the basic run-time entities in an object oriented system.


In object oriented programming the problem is divided in terms of objects rather then functions. The data in object may also be treated as a record.

Classes: A class is a collection of objects of similar type. Once a class has


been defined, we can create any number of objects belonging to that class. In procedural language we use only primitive data types like int, long and float. In C++ we can also create user defined data types like date and time.

Reusability: Object oriented programs are built from reusable software


components. Once a class is completed and tested, it can be distributed to other programs for use in their own programs. This is called reusability. We can also add new features by changing existing one or by adding new feature in derived class, which saves a lot of time to write new code.

Encapsulation: The wrapping up of data and function into a single unit


(called class) in known as encapsulation. Data encapsulation is the most striking feature of a class.

Inheritance: Inheritance is the process by which objects of one class


acquire properties of objects of another class. It provides the idea of reusability.

Polymorphism: OOP provide elegant facility called polymorphism


(means one thing with several distinct forms). It permits us to define a function that work differently in different situation.
6

BANKING SYSTEM

So I have chosen C++ for my project as front end.

ABSTRACT
The old system are now-a-days being computerized for a faster , more reliable and accurate outcomes. The main aim of my project is to serve such purposes by developing software having such type of capabilities. The computer based BANKING SYSTEM for monitoring of the Sales & purchase of any General Store has been developed keeping in view of the user requirement. A computer based BANKING SYSTEM monitors all the activities like Daily Sales, Purchase, stock in hand, Billing , Tranjection etc. The system will be developed in c++ The software will provides report generation facilities. Proper validation and verification function will be incorporated to get valid input from the authentic users.

BANKING SYSTEM

C++ Provide different Header Files for their powerful programming like:<iostream.h>
It is well known that c++is a tool for Object oriented programming (OOP). In order to handle the various Object oriented feature of a program ,it is essential to have robust input and output facilities . Most of the object oriented programs handle three Items object ,message passing and optional parameters with the message from the outsideworld . C++ provide a new way to perform the input and output operations called iostream method The standard header files input and output stream (iostream.h)contain a set of small and specific general purpose function for handling input and output data. C++ are normally performesd by using the I/O stream as cin for input and cout for output data the i/o stream The Borlandc+ +usesiostream.h for most stream related operations .
8

BANKING SYSTEM

The fallowing are the list of various stream related header files to be includefor input and output processing for idiffrent various of the C++ Compilers Borland C++ Turbo C++ Microsoft Visual c++ C++ COMPILERS Iostream.h , ios.h , iomanip.h , iostream.h ,ios.h ,iomanip.h ios.h , istream.h , ostream.h HEADER FILES INCLUDED andstreamb.h

BANKING SYSTEM

SYSTEM PLANNING
Without planning it is difficult to measure the progress of project. I have planned the lifecycle of my project. Project planning involves the plotting project activities against the time frame. I have used PERT Chart for the planning of my project. PERT Chart PERT stands for program evaluation review technique, which is a project management tool, used to schedule, organize and coordinate tasks within a project. A PERT Chart presents a graphic illustration of a project as a network diagram consisting of numbered nodes (either circles or rectangle) representing events, or milestones in the project. Like GANTT chart PERT Chart makes use of tasks. Like milestone chart it shows achievements. PERT Chart uses paths and events to show the interrelationship of project activities, PERT make use of tasks and it shows the achievements. 1. Terminal achievements called EVENTS. 2. ARROW is used to show represent task. 3. A CIRCLE represents the beginning or completion of task.

10

BANKING SYSTEM

It also helps in determining the critical path of the project and establish most likely time estimate for individual tasks by applying statistical models. The direction of the arrow on the lines is the PERT chart indicates the sequence of tasks. The Events Of My Project Are Shown In Following Table:

1. Start 2. System requirement analysis and feasibility study. 3. Procedural design 4. Designing I/O screens 5. Back end design 6. Front end design 7. Preparation of test cases 8. Testing 9. Draft of documentation 10.Edit/format documentation 11.Printing 12.End

11

BANKING SYSTEM

PERT CHART OF BANKING SYSTEM

3 5 4 6

1 1 1 0

1 2

12

BANKING SYSTEM

System Analysis and Design


The efficiency of the existing manual system of the unit is low since for providing any service to its users, it has to look for the specific record of the customer and then provide the request for others. In the proposed system, Account updating, enquiry about customer etc can be performed easily and efficiently. The existing manual system is time consuming and different people involve for the same kind of work. Different works are allotted to different counters. The report generation was also cumbersome and time consuming. Data is collected from different sources and places for reports.. The proposed system is user friendly and efficient. The end user can operate it easily. Different queries related to customer enquiry and accounts can be performed quickly. Based on the feeded data different types of reports can be created. There is no need for different counters for entry like paying rooms charges, service order or due charge of rooms. All these entries can be performed at a same counter. The new system will manage the records so beautifully that user does not have to engaged with it. The new proposed computerized system provides a good interface which can help to those who does not have a good typing speed.

13

BANKING SYSTEM

Retrieval of old records was also not an easy process in the existing system. But the newly developed systems have the facility to work with the records Ex Guests.

14

BANKING SYSTEM

System Design
In the System Design process the banking requirements are identified and it is ensured that the proposed system satisfies these requirements.

Form design
The Banking System Software has the many forms some of them are as follows.

I About the project


Screen displays the general information about the project. In the simple presentation.

II - Menu
It have many option some are See account ,list of accounts, transaction, open new account, edit accounts, help , quit. User choose any option then the particular task is executed.

III See account


This option is associated with the particular customer account number. It is used to display about the customers information account . It also displays the transaction details such as withdrawal / deposit .

IV List of accounts . This option displays the total list of customer who has account
in the bank,the information associated is accont no,name,balance.
15

BANKING SYSTEM

V Transactions
This option used for transaction of money from the particular accont no. such as deposit / withdrawal.

VI Open new account


This option is used to open a new account for the customer in the bank.

VII Edit account This option is used to do modification in the particular account no. such as the change in name and address of the particular account no .the closing of the account is done. VIII - Help
This option gives the general information about the project which helps us to operate the project efficiently.

IX Quit
This option let us out of the project. To close the software.

16

BANKING SYSTEM

Reports
Input will be through various forms. Output will be through different reports. All the fields in the forms are appropriately labeled and the properties defined as per the type of input and the tab settings defined for easy and fast data entry. There are different queries and reports available such as.
I. Display information about particular customer through account

no.
II. List the all the customer present in the bank.

III. Operation is done particular account no such as the transaction of withdrawal /deposit of money. IV. Opening a new account in the bank for the customer.
V. Modification / Deletion of account for the particular customer.

17

BANKING SYSTEM

Software Methodology Adopted


Modular approach is used for developing the Banking System. A system is modular if it has discrete components. Each component can be implemented separately and a change to one component has minimal impact on other components. A system is a hierarchy of components; the highest-level component corresponds to the total system. To design such hierarchy there are two different approaches I- Top- Down Approach
II -Bottom- Up Approach

Both approaches have their merits and demerits. For the proposed system Fop Down approach has been used. It starts by identifying the major components of the system, decomposing them into lower level components and iterating until desired details is achieved. Op Down design methods often result in some form of stepwise refinement. In each step the design is refined to more a concrete level, until a level is reached where further refinement is not needed and the design can be implemented directly. A top down approach is used only if specifications of the system are known and system development is from scratch.

18

BANKING SYSTEM

System Implementation The implementation plan consists of steps required for implementing the software in any organization. In converting from manual to computerized system, the objectives is to put the tested system into operation while keeping cost, risk and employee irritation to minimum. It involves crating Computer compatible files Training operation staff Installing terminals and hardware Conversion is the last step before the candidate system begins to show results. Unfortunately conversion results in chaos for many organizations. Therefore to avoid it parallel run approach is used. The basic steps involves in conversion are It begins with the review of project plan, system testing and documentation and implementation plan. Files are converted. Parallel processing between the existing and new system is installed. In parallel approach we run both the existing system and the new system side by side. The reason for this approach is that the software has been prepared and tested on stand-alone system. So the new system will be used along with existing system for sometime to test whether the system is working satisfactorily under real life conditions. If there are any problems with the software, the necessary changes will be made in the software and then it will be implemented again.

19

BANKING SYSTEM

Hardware and software used


The BANKING SYSTEM software is easy to install. The user has to fulfill the following basic requirements to enable him to run the software.

Hardware Requirement

Processor Main memory Monitor Mouse Printer


Software Requirements

Pentium (grater than 200 MHz) 32 MB 14 inch colored Serial Plug and Play Mouse One high speed

Operating system Front End

Windows xp Turbo C++

20

BANKING SYSTEM

System Maintenance and Evaluation


System Maintenance task involves Changing the present system for its more effective utilization

Addition of new features or functions Changing the installed software to run in the new environment. Removing the errors of the existing system. the system has been installed and is operational

After

maintenance engineers who periodically introduce changes, add new features, remove errors in the present system so that it functions smoothly without breakdown do its maintenance. System evaluation After the system is implemented, it is evaluated. Evaluation involves verification of the system capability after it is operational to see if it fulfilling the objectives or not. The Banking system was implemented and different test data was fed into the system, the desired result assumed during system analysis phase were achieved. The actual benefit and efficiency of the developed system was compared with the existing manual system. The overall performance and image of the organization improved.

21

BANKING SYSTEM

Cost Benefit Analysis


Cost Benefit Analysis is a tool for judging the effectiveness of the project. It may be used by management to decide as to what extend benefits out weigh the cost. The costs associated with the proposed system are the expenses involved in developing, installing, training and implementing the system. The primary objective of the cost benefit analysis is to find out whether it is economically worthwhile to invest in the proposed project. If the return on the investment is high, the project is considered economically viable. To assess the economic feasibility of the system the break-even analysis technique has been used. In the break-even analysis technique the point at which the cost of the proposed system and the present one are equal, is known as break-even point. The break even point is time at which the cost of the new system equals the cost of the present one. The new system will have initial cost due to development expenses. At break-even points both system are equal in their cost. After the break-even points the new system shows benefits as compared to the existing system. The period before the break-even point is the investment period and the one after this point is the return period.

22

BANKING SYSTEM

The cost of converting the manual system to a computerized system include installing computer terminals, training of the personnel in computer skill, data conversion from manual to computerized system, building computer files and databases etc. The benefit that follow include faster processing satisfied customer and improve organizational performance. The market grow is expected to be 40% per annum. It is expected that the break-even point of the investment would be would be achieved with in a period of 2.5 years. of data,

reduce inquiry response time, increase transaction handling, more

23

BANKING SYSTEM

SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)

The system development life cycle (SDLC), which has been applied in development of this system, is an organized, structured methodology for developing implementing and installing a new or revised computer information system (CIS) standard phases include investigation, analysis and general design, detailed design and implementation, installation and review.
1. Investigation Phase:

This phase is at the inception of the systems

development life cycle to determine whether a full systems development effort or another course of action is appropriate. Initial Investigation: This activity handles and evaluates requests for new or improved automated systems (CIS) services. The end result is an understanding of the request at a level sufficient to make a preliminary recommendation as to the course of action to be followed. Feasibility study: a study that when complete, will have evaluated initially the relevant factors involved in a problem on need, considered preliminary alternative solutions, recommended a definite course of action and projected estimated costs and benefits to be derived from the recommended solution.
2. Analysis and general design phase: this is a major segment (phase) of

the system development life cycle. It includes establishing definitions and descriptions of existing system, defining requirements for and designing features of a proposed replaced system and doing a cost/benefit analysis.
24

BANKING SYSTEM

The report to management at the conclusion of this phase provides the basic taking decision on implementation of a new system. Existing system review: the beginning of the analysis and general design phase, intended to obtain an understanding of the scope of a project. New system requirements: a definition of the necessary capabilities of a new system from the users point of view. New system design: a comprehensive proposal for a new computer information system (CIS), encompassing both user specification and all updated and/or additional detailing of hardware, software, procedures and documentation needed for actual implementation. Implementation and installation planning: The objective of this activity to create a project plan that covers the next phases.
3. Detailed design and implementation phase: This phase of the system

development life cycle refines hardware and software specification, establishing programming plans, trains users and implements extensive testing procedures to evaluate design and operating specification and/or provides the basic for further modification. Technical design: This activity builds upon specifications produced during new system design, adding detailed technical specifications and documentation

25

BANKING SYSTEM

Test specifications and planning: This activity prepares detailed test specifications for individual modules and programs, job streams, sub-systems and for the system as a whole. Programming and testing: This activity encompasses actual development, writing and testing of program unit or modules.

26

BANKING SYSTEM

27

BANKING SYSTEM

//********************************************************** // PROJECT BANKING //********************************************************** //********************************************************** // INCLUDED HEADER FILES //********************************************************** #include <iostream.h> #include <fstream.h> #include <process.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <conio.h> #include <dos.h> //*************************************************************** // THIS CLASS CONTAINS FUNCTIONS RELATED TO //DRAW BOX ETC. //*************************************************************** class shape { public : void line_hor(int, int, int, char) ; void line_ver(int, int, int, char) ; void box(int,int,int,int,char) ; }; //******************************************************************
28

BANKING SYSTEM

// THIS CLASS CONTROL ALL THE FUNCTIONS IN THE // MENU //****************************************************************** class control { public : void main_menu(void) ; void help(void) ; private : void edit_menu(void) ; }; //*************************************************************** // 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) ; void delete_account(int) ; void update_balance(int, float) ; void modify(void) ; int last_accno(void) ; int found_account(int) ; char *return_name(int) ; char *return_address(int) ; float give_balance(int) ; int recordno(int) ; void display(int) ;
29

BANKING SYSTEM

private : void modify_account(int, char t_name[30], char t_address[60]) ; void box_for_list(void) ; int accno ; 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 //
30

BANKING SYSTEM

float interest, amount, balance ; };

//********************************************************** // 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 ; } } //********************************************************** // 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 ; } }

31

BANKING SYSTEM

//********************************************************** // 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) { 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) ;
32

BANKING SYSTEM

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) ; } //************************************************************* // FUNCTION TO DISPLAY MAIN MENU AND CALL // OTHER FUNCTIONS //************************************************************* void control :: main_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(YELLOW) ; gotoxy(32,21);cprintf(" ................. "); gotoxy(24,24);cprintf(" Special Thanks To MR.S.P.GOSWAMI "); textcolor(CYAN) ; textbackground(BLUE) ;
33

BANKING SYSTEM

gotoxy(32,7) ; cprintf(" B A N K I N G ") ; gotoxy(35,9) ; cprintf(" OPTIONS ") ; textcolor(YELLOW) ; textbackground(BLACK) ; gotoxy(30,11) ; cout <<"1: SEE ACCOUNT" ; gotoxy(30,12) ; cout <<"2: LIST OF ACCOUNTS" ; gotoxy(30,13) ; cout <<"3: TRANSACTIONS" ; gotoxy(30,14) ; cout <<"4: OPEN NEW ACCOUNT" ; gotoxy(30,15) ; cout <<"5: EDIT ACCOUNTS" ; gotoxy(30,16) ; cout <<"6: HELP" ; gotoxy(30,17) ; cout <<"0: QUIT" ; gotoxy(30,19) ; cout <<"Enter your choice: " ; ch = getche() ; if (ch == 27) break ; else if (ch == '1') { account a ; a.display_account() ; } else if (ch == '2') { initial ini ;
34

BANKING SYSTEM

ini.display_list() ; } else if (ch == '3') { account a ; a.transaction() ; } else if (ch == '4') { account a ; a.new_account() ; } else if (ch == '5') edit_menu() ; else if (ch == '6') help() ; else if (ch == '0') break ; } for (int i=25; i>=1; i--) { delay(40) ; gotoxy(1,i) ; clreol() ; } } //************************************************************ // FUNCTION TO DISPLAY EDIT MENU AND CALL // OTHER FUNCTIONS //************************************************************
35

BANKING SYSTEM

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(RED) ; textbackground(BLUE) ; gotoxy(34,10) ; cprintf(" EDIT MENU ") ; textcolor(YELLOW) ; textbackground(BLACK) ; 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')
36

BANKING SYSTEM

{ account a ; a.close_account() ; break ; } else if (ch == '0') break ; } } //************************************************************* // FUNCTION TO DISPLAY HELP ABOUT PROJECT //************************************************************* void control :: help(void) { clrscr() ; textcolor(RED+BLINK) ;textbackground(GREEN); gotoxy(22,3); cprintf(" P R O J E C T B A N K I N G ") ; textcolor(BLACK); gotoxy(28,4);cprintf(" By- RAJESH KUMAR "); delay(10) ; gotoxy(10,6); cout <<"In this Project you can keep records of daily banking" ; delay(10) ; gotoxy(10,7); cout <<"transactions. "; delay(10) ; gotoxy(10,9); cout <<" This program is capable of holding any no. of accounts." ; delay(10) ; gotoxy(10,11); cout <<"- In the first option you can see the account of a particular" ;
37

BANKING SYSTEM

delay(10) ; gotoxy(10,12); cout <<" person by giving simply the account no. of that person." ; delay(10) ; gotoxy(10,14); cout <<"- In second option you can see the list of all the accounts." ; delay(10) ; gotoxy(10,16); cout <<"- Through third option you can operate banking transactions" ; delay(10) ; gotoxy(10,17); cout <<" (Deposit/Withdraw)." ; delay(10) ; gotoxy(10,19); cout <<"- In Fourth option you can open new account." ; delay(10) ; gotoxy(10,20); cout <<" (NOTE: Opening amount should not be less than Rs.500/-)" ; delay(10) ; gotoxy(10,22); cout <<"- In Fifth option you can modify or Delete any of the accounts." ; delay(10) ; gotoxy(10,24); cout <<"- And the last option is to Quit the PROJECT (Exit to Dos). " ; delay(10) ; textcolor(MAGENTA+BLINK) ; textbackground(LIGHTGREEN) ; gotoxy(26,25) ; cprintf(" Press any key to continue ") ; textcolor(YELLOW) ; textbackground(BLACK) ; gotoxy(25,2) ; getch() ; for (int i=25; i>=1; i--) { delay(50) ; gotoxy(1,i) ; clreol() ;
38

BANKING SYSTEM

} }

//******************************************************************* // THIS FUNCTION RETURN LAST ACCOUNT NO. IN THE // FILE REC1.DAT //******************************************************************* int initial :: last_accno(void) { fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| ios::binary) ; file.seekg(0,ios::beg) ; int count=0 ; while (file.read((char *) this, sizeof(initial))) count = accno ; file.close() ; return count ; } //************************************************************* // THIS FUNCTION RETURN RECORD NO. OF THE // GIVEN ACCOUNT NO. IN THE FILE REC1.DAT //************************************************************* int initial :: recordno(int t_accno) { fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| ios::binary) ;
39

BANKING SYSTEM

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 ; } //******************************************************************* // THIS FUNCTION DISPLAY THE ACCOUNT FOR GIVEN // ACCOUNT NO. FROM THE FILE REC1.DAT //******************************************************************* void initial :: display(int t_accno) { shape s ; s.box(8,7,73,11,219) ; fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| ios::binary) ; file.seekg(0,ios::beg) ; while (file.read((char *) this, sizeof(initial))) { if (t_accno == accno) { gotoxy(8,5) ; cout <<"ACCOUNT NO. " <<accno ; gotoxy(10,8) ; cout <<"Name : "<<name ; gotoxy(10,9) ;
40

BANKING SYSTEM

cout <<"Address : " <<address ; gotoxy(10,10) ; cout <<"Balance : " <<balance ; break ; } } file.close() ; } //*************************************************************** // THIS FUNCTION RETURN NAME FOR THE GIVEN // ACCOUNT NO. IN THE FILE REC1.DAT //*************************************************************** char *initial :: return_name(int t_accno) { fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| 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 ; }

41

BANKING SYSTEM

//****************************************************************** // THIS FUNCTION RETURN ADDRESS FOR THE GIVEN // ACCOUNT NO. IN THE FILE REC1.DAT //****************************************************************** char *initial :: return_address(int t_accno) { fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| 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 ; } //****************************************************************** // THIS FUNCTION RETURN BALANCE FOR THE GIVEN // ACCOUNT NO. IN THE FILE REC1.DAT //****************************************************************** float initial :: give_balance(int t_accno) { fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| ios::binary) ;
42

BANKING SYSTEM

file.seekg(0,ios::beg) ; float t_balance ; while (file.read((char *) this, sizeof(initial))) { if (accno == t_accno) { t_balance = balance ; break ; } } file.close() ; return t_balance ; } //***************************************************************** // THIS FUNCTION RETURN 1 IF THE GIVEN ACCOUNT // NO. FOUND IN THE FILE REC1.DAT //***************************************************************** int initial :: found_account(int t_accno) { fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| ios::binary) ; file.seekg(0,ios::beg) ; int found=0 ; while (file.read((char *) this, sizeof(initial))) { if (accno == t_accno) { found = 1 ; break ; } }
43

BANKING SYSTEM

file.close() ; return found ; } //***************************************************************** // 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(RED) ; textbackground(WHITE) ; gotoxy(4,4) ; cprintf("ACCOUNT NO. NAME OF PERSON BALANCE") ; textcolor(YELLOW) ; textbackground(BLACK) ; 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 ; }
44

BANKING SYSTEM

//****************************************************************** // THIS FUNCTION DISPLAYS THE LIST OF ACCOUNTS // IN FILE . REC1.DAT //****************************************************************** void initial :: display_list(void) { clrscr() ; box_for_list() ; int row=6, flag ; fstream file ; file.open("REC1.DAT", ios::in|ios::out|ios::ate| ios::binary) ; file.seekg(0,ios::beg); 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() ;
45

BANKING SYSTEM

box_for_list() ; } } file.close() ; if (!flag) { gotoxy(4,24) ; cout <<"Press any key to continue..." ; getch() ; } } //**************************************************************** // THIS FUNCTION ADDS THE GIVEN DATA INTO THE // FILE REC1.DAT //**************************************************************** void initial :: add_to_file(int t_accno, char t_name[30], char t_address[60], float t_balance) { fstream file ; file.open("REC1.DAT", ios::ate| ios::in|ios::out| ios::binary) ; file.clear(); char ch; cin.get(ch); accno = t_accno ; strcpy(name,t_name) ; strcpy(address,t_address) ; balance = t_balance ; file.write((char *)this , sizeof(initial)) ; file.close() ; } //******************************************************************
46

BANKING SYSTEM

// THIS FUNCTION DELETES RECORD FOR THE GIVEN // ACOUNT NO. FROM THE FILE REC1.DAT //****************************************************************** void initial :: delete_account(int t_accno) { fstream file ; file.open("REC1.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)) ; } file.close() ; temp.close() ; file.open("REC1.DAT", ios::out|ios::binary) ; temp.open("TEMP.DAT", ios::in|ios::out|ios::ate| 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() ; }
47

BANKING SYSTEM

//****************************************************************** // THIS FUNCTION UPDATE BALANCE FOR THE GIVEN // ACOUNT NO. IN THE FILE REC1.DAT //****************************************************************** void initial :: update_balance(int t_accno, float t_balance) { int recno ; recno = recordno(t_accno) ; fstream file ; file.open("REC1.DAT", ios::in|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() ; } //**************************************************************** // THIS FUNCTION MODIFIES THE RECORD FOR THE // GIVEN DATA. IN THE FILE REC1.DAT //**************************************************************** void initial :: modify_account(int t_accno, char t_name[30], char t_address[60]) { int recno ; recno = recordno(t_accno) ; fstream file ;
48

BANKING SYSTEM

file.open("REC1.DAT", ios::in|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() ; } //************************************************************** // THIS FUNCTION GIVE THE DATA TO MODIFY THE // RECORD IN THE. FILE REC1.DAT //************************************************************** void initial :: modify(void) { clrscr() ; char t_acc[10] ; int t, t_accno ; gotoxy(5,5) ; 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() ;
49

BANKING SYSTEM

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(71,1) ; cout <<"<0>=Exit" ; textbackground(BLUE) ; gotoxy(3,3) ; for (int i=1; i<=76; i++) cprintf(" ") ; textbackground(BLACK) ; textcolor(RED+BLINK) ; textbackground(BLUE) ; gotoxy(30,3) ; cprintf("MODIFY ACCOUNT SCREEN") ; textcolor(YELLOW) ; textbackground(BLACK) ; 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 ; display(t_accno) ; account a ; do { a.clear(5,13) ; gotoxy(5,13) ; cout <<"Modify this account (y/n): " ; ch = getche() ; if (ch == '0') return ;
50

BANKING SYSTEM

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 " ; 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 GREATER THAN 25") ; getch() ; } } while (!valid) ; if (strlen(t_name) > 0) modified = 1 ; do {
51

BANKING SYSTEM

a.clear(15,16) ; a.clear(5,23) ; gotoxy(5,23) ; cout <<"ENTER ADDRESS " ; 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 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')
52

BANKING SYSTEM

return ; modify_account(t_accno,t_name,t_address) ; gotoxy(5,21) ; cout <<"\7Record Modified" ; gotoxy(5,23) ; cout <<"Press any key to continue..." ; getch() ; } //********************************************************** // THIS FUNCTION CLEAR THE GIVEN ROW AND // COLUMNS //********************************************************** void account :: clear(int col, int row) { for (int i=col; i<=78; i++) { gotoxy(i,row) ; cout <<" " ; } } //**************************************************************** // THIS FUNCTION ADDS THE GIVEN DATA INTO THE // FILE. RECB.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 ;
53

BANKING SYSTEM

file.open("RECB.DAT", ios::in|ios::out|ios::ate| ios::binary) ; if(file.eof()) file.clear(); 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 ; char ch ; cin.get(ch); file.write((char *) this, sizeof(account)) ; file.close() ; } //***************************************************************** // THIS FUNCTION DELETES THE RECORD FOR GIVEN // ACCOUNT NO. FROM FILE RECB.DAT //***************************************************************** void account :: delete_account(int t_accno) { fstream file ; file.open("RECB.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)) ;
54

BANKING SYSTEM

if ( file.eof() ) break ; if ( accno != t_accno ) temp.write((char *) this, sizeof(account)) ; } file.close() ; temp.close() ; file.open("RECB.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 RECB.DAT //********************************************************** void account :: new_account(void) { char ch ; int i, valid ; clrscr() ; initial ini ; shape s ; s.box(2,2,79,24,218) ;
55

BANKING SYSTEM

s.line_hor(3,78,4,196) ; s.line_hor(3,78,22,196) ; gotoxy(71,1) ; cout <<"<0>=Exit" ; textbackground(BLUE) ; gotoxy(3,3) ; for (i=1; i<=76; i++) cprintf(" ") ; textbackground(BLACK) ; textcolor(RED+BLINK) ; textbackground(BLUE) ; gotoxy(32,3) ; cprintf("OPEN NEW ACCOUNT") ; textcolor(YELLOW) ; textbackground(BLACK) ; int d1, m1, y1 ; struct date d; getdate(&d); d1 = d.da_day ; m1 = d.da_mon ; y1 = d.da_year ; int t, t_accno ; char t_name[30], t1[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 : " ; gotoxy(5,10) ; cout <<"Name : " ; gotoxy(5,11) ; cout <<"Address : " ; gotoxy(5,12) ; cout <<"Name of Verifying person : " ; gotoxy(5,14) ; cout <<"Initial Deposit : " ; do { clear(20,8);
56

BANKING SYSTEM

clear(5,23); gotoxy(5,23); cout<<"ENTER THE ACCOUNT NO"; valid = 1; gotoxy(20,8); gets(t1); t=atoi(t1); t_accno = t; if(t_accno== 0) return; } while(!valid); 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 BLANK OR GREATER THAN 25") ; getch() ; } } while (!valid) ; do { clear(15,11) ;
57

BANKING SYSTEM

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 { char vari[30] ; clear(31,12) ; clear(5,23) ; gotoxy(5,23) ; cout <<"ENTER NAME OF THE VERIFYING PERSON" ; valid = 1 ; gotoxy(31,12) ; gets(vari) ; strupr(vari) ; if (vari[0] == '0') return ; if (strlen(vari) == 0 || strlen(vari) > 25) {
58

BANKING SYSTEM

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(t1) ; t_bal = atof(t1) ; t_balance = t_bal ; if (t1[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) ; valid = 1 ;
59

BANKING SYSTEM

gotoxy(5,17) ; cout <<"Do you want to save the record (y/n) : "; ch = getch() ; 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_a mount,t_balance) ; } //****************************************************************** // THIS FUNCTION DRAWS THE BOX FOR DISPLAYING // RECORD FROM. FILE RECB.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) ;
60

BANKING SYSTEM

s.line_hor(3,78,23,196) ; textbackground(BLUE) ; gotoxy(3,5) ; for (int i=1; i<=76; i++) cprintf(" ") ; textbackground(BLUE) ; textcolor(RED) ; textbackground(BLUE) ; gotoxy(4,5) ; cprintf("DATE PARTICULAR DEPOSIT WITHDRAW INTEREST BALANCE") ; textcolor(YELLOW) ; textbackground(BLACK) ; 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 // RECB.DAT
61

BANKING SYSTEM

//***************************************************************** void account :: display_account(void) { clrscr() ; char t_acc[10] ; int t, t_accno ; 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 ; } box_for_display(t_accno) ; int row=7, flag ; fstream file ; file.open("RECB.DAT", ios::in|ios::out|ios::binary) ; file.seekg(0,ios::beg); while (file.read((char *) this, sizeof(account))) { if (accno == t_accno) { flag = 0 ; delay(10) ; gotoxy(4,row) ;
62

BANKING SYSTEM

cout <<dd <<"/" <<mm <<"/" <<yy ; gotoxy(16,row) ; cout <<type ; if (tran == 'D') gotoxy(30,row) ; else gotoxy(42,row) ; cout <<amount ; gotoxy(56,row) ; cout <<interest; gotoxy(66,row) ; cout <<balance ; row++ ; if (row == 23) { flag = 1 ; row = 7 ; gotoxy(4,24) ; cout <<"Press any key to continue..." ; getch() ; clrscr() ; box_for_display(t_accno) ; } } } file.close() ; if (!flag) { gotoxy(4,24) ; cout <<"Press any key to continue..." ; getch() ; } }
63

BANKING SYSTEM

//*********************************************************** // 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. //**********************************************************
64

BANKING SYSTEM

float account :: calculate_interest(int t_accno, float t_balance) { fstream file ; file.open("RECB.DAT", ios::in|ios::out|ios::ate| ios::binary) ; file.seekg(0,ios::beg) ; int d1, m1, y1, days ; while (file.read((char *) this, sizeof(account))) { if (accno == t_accno) { 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 ;
65

BANKING SYSTEM

} 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 ; 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) ;
66

BANKING SYSTEM

s.line_hor(3,78,22,196) ; gotoxy(71,1) ; cout <<"<0>=Exit" ; textbackground(BLUE) ; gotoxy(3,3) ; for (int i=1; i<=76; i++) cprintf(" ") ; textbackground(BLACK) ; textcolor(RED+BLINK) ; textbackground(BLUE) ; gotoxy(29,3) ; cprintf("TRANSACTION IN ACCOUNT") ; textcolor(YELLOW) ; textbackground(BLACK) ; 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 ; gotoxy(5,15) ; cout <<"Last Balance : Rs." <<t_balance ; char t_tran, t_type[10], tm[10] ;
67

BANKING SYSTEM

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() ; }
68

BANKING SYSTEM

} 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." ; 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() ;
69

BANKING SYSTEM

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_a mount,t_balance) ; }

//********************************************************** // THIS FUNCTION CLOSE THE ACCOUNT // (DELETE ACCOUNT). //********************************************************** void account :: close_account(void) { clrscr() ; char t_acc[10] ; int t, t_accno ; gotoxy(5,5) ; cout <<"Enter the account no. " ; gets(t_acc) ; t = atoi(t_acc) ;
70

BANKING SYSTEM

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(71,1) ; cout <<"<0>=Exit" ; textbackground(BLUE) ; gotoxy(3,3) ; for (int i=1; i<=76; i++) cprintf(" ") ; textbackground(BLACK) ; textcolor(RED+BLINK) ; textbackground(BLUE) ; gotoxy(30,3) ; cprintf("CLOSE ACCOUNT SCREEN") ; textcolor(YELLOW) ; textbackground(BLACK) ; 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 ;
71

BANKING SYSTEM

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 any key to continue..." ; getch() ; } //***************************************************************** // THIS IS MAIN FUNCTION CALLING HELP AND MAIN // MENU FUNCTIONS //***************************************************************** void main(void) { control c ; c.help(); c.main_menu() ; }
72

BANKING SYSTEM

73

BANKING SYSTEM

74

BANKING SYSTEM

75

BANKING SYSTEM

76

BANKING SYSTEM

77

BANKING SYSTEM

78

BANKING SYSTEM

79

BANKING SYSTEM

80

BANKING SYSTEM

81

BANKING SYSTEM

82

BANKING SYSTEM

ENTITY RELATIONSHIP MODEL:

83

BANKING SYSTEM

amount name accno date balance

accno

INITIAL

Custome r accountn o

ACCOUNT

address

balance

Date dd, mm, yy

interest

tran E-R-D Type c/w

DATA FLOW DIAGRAM(DFD)


84

BANKING SYSTEM

EDIT MENU

1.MODIFY ACCOUNT 2.CLOSE ACCOUNT modify data Data store Input data OPEN A NEW ACCOUNT Input data modify data

Data store REC1.DAT DATABASE.

RECB.DAT DATABASE.

updating data TRANSACTIO N

updating data

85

BANKING SYSTEM

FLOWCHART
start

MAIN MENU
Ch=getch( ) Do while ch<=6 //see account a.display_account(); //list of accounts ini.display_list();

If ch=1 N If ch=2 N If ch=3 N If ch=4 N If ch=5 N If ch=6 N If ch=0 N STOP

//Transaction a.transaction(); //open new account a.new_account(); //Edit account edit_menu(); //Help help(); //quit break;

86

BANKING SYSTEM

EDIT MENU FLOWCHART

EDIT MENU

Ch=getch( )

While(1)

If ch=1 N If ch=2 N If ch=0 N

//modify account ini.modify();

//close account a.close_account();

//quit of edit menu break;

Return to main menu

87

BANKING SYSTEM

DATA DICTIONARY
Data dictionary is a storehouse of data giving information about data. It is a list of terms and their definition for all data items and data files. This gives a catalogue of the data elements used in the system developed. It also contains description and definition concerning data structure, data elements and their interrelationship. Data dictionary entry for data element emp_code: DATA ELEMENTS DESCRIPTION : accno : A unique permanent code assigned to each Customer of the bank. TYPE ALIAS : int. : t_accno

Data dictionary for data structure (data flow) for report: DATA STRUCTURE DESCRIPTION : Report : Gives the account details of a particular bank

customer on the basis of a unique account no.and about the transaction. VOLUME DATA FLOW DATA STORE : avalibility of the disk space. : classes define. : database file.

88

BANKING SYSTEM

Data dictionary entry for process transaction within account: Process name Incoming data flow Outgoing data flow : transaction : database file ,structure of as class define. : update of database file.

89

BANKING SYSTEM

CLASS DIAGRAM

CLASS SHAPE
Public: Void line_hor(int,int,int,char); Void line_ver(int,int,int,char); Void box(int,int,int,int,char);

CLASS CONTROL
Public: Void main_menu(void); Void help(void); Private: Void edit_menu();

90

BANKING SYSTEM

CLASS INITIAL
Public: Void add_to_file(int,char t_name[30],char t_address[60],float); Void display_list(void); Void delete_account(int); Void update_balance(int,float); Void modify(void); Int last_account(void); Int found_account(int); Char*return_name(int); 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; Char name[30],address[60]; Float balance;

91

BANKING SYSTEM

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]; Int dd,mm,yy; Char tran; Float interest, amount,balance;

92

BANKING SYSTEM

REQUIREMENT ANALYSIS
Finally the general requirements of any banking system are: Project should be user friendly. Project should reduce manual task as much as possible.
Project should keep complete information of the account.

Records can be easily added, deleted and updated.


This project should operate the transaction on account d/w.

The project is developed using C++ as front end and the binary files are used to store the records which are back end of the project. It is DOS based make the project easy to use and user friendly.

93

BANKING SYSTEM

TESTING
The process of making sure that the program performs the intended task correctly. The software is checked and dry run by giving a small source code segment and verify that it has been correctly implemented. It is checked that at which point errors has occurred, if any type of errors are detected then it is removed by changing the source code at desired place in the program. This process is done repeatedly until no errors logical errors are found at any point. It is also checked for carelessness (means that a user cant input undesired value), improper communication (means that a user cant leave a field value blank) and validation, (means that a user cant input the data above or below the mentioned range). System testing may be one of the following type: 1. white-box testing 2. black-box testing 3. interface testing 4. alpha testing 5. beta testing

94

BANKING SYSTEM

In this project I have used black-box testing to perform checks. It is concerned with the proper execution of the program specifications. In this case each function and sub-program used in the main program is first identified and checked separately. For ex. to modify the particular account edit_menu(void) function used which is used to modify the name and address of particular account no, I independently test this module in following steps1. Test case are prepared 2. Preparation of possible test data with all the validation checks. 3. Actual testing done manually. 4. Modification done for the errors during testing. Validation check: in validation check I have test that a string constant may not be empty, and user cant leave the field blank. Like name and address of a customer should not be leave blank. The data validation is also done on numeric data by defining min. and max. Value. It is impracticable to input the value out of the defined range. Like the opening balance in the bank should not less than Rs.500. In case of choice a user can press only the specified key. For ex. In choosing YES/NO user can press only Y/N regarding to the case.

95

BANKING SYSTEM

PLATEFORM USED
The operating system used in developing this project is Windows XP Operating System. This operating system is used in most areas, so it is very popular. The main features of Windows XP operating system is as follows. Improve reliability Easy to use and understand Faster operating system Supports 50 lines of text in one DOS screen

96

BANKING SYSTEM

Why C++ Is Used The TURBO C++ is used to develop this project. It is an object oriented programming (OOP) language, which supports some special features. These are as Emphasis is on data rather then procedures. Programs are divided in to what are known as objects. Data structures are designed such that they characterized the objects. Functions that operate on the data of an object are tied together in data structure. Data is hidden and cant be accessed by external functions. Object may communicate with each other through functions. New data and functions can be easily added whenever necessary. Follows bottom up approach in program design. Data can be inherited from existing classes.

97

BANKING SYSTEM

BIBLIOGRAPHY

Structured System Analysis and Design System Analysis and Design Object Oriented Programming with C++ Let Us C++

V. K. Jain Elias m. Award E. Balaguruswami Yashvant Kanetker

REFERENCES A Project Report for BANKING SYSTEM from which some references were included.

WEBSITE I have used DOEACC.EDU.IN website for the information that how to create a standard project on any system, and what should be the headings for creating the project report for A Level.

98

BANKING SYSTEM

99

You might also like