189
A PROJECT REPORT ON ”PUNJAB NATIONAL BANKING SYSTEM” Session: 2012-13 Submitted in partial fulfillment of Bachelor of Computer Applications Project Incharge: Submitted By: 1

PUNJAB NATIONAL BANK VB PROJECT

Embed Size (px)

DESCRIPTION

BCA STUDENTS

Citation preview

Page 1: PUNJAB NATIONAL BANK VB PROJECT

A

PROJECT REPORT

ON

”PUNJAB NATIONAL BANKING SYSTEM”

Session: 2012-13

Submitted in partial fulfillment of Bachelor of Computer Applications

Project Incharge: Submitted By: Mr.SURJEET KUMAR

Department of Computer Sciences

1

PANKUSH RAINA

MOHIT SHARMA

NITISH KUMAR

ANU GANJOO

Page 2: PUNJAB NATIONAL BANK VB PROJECT

AFFILIATED TO JAMMU UNIVERSITY

Session: 2012-13

CERTIFICATE

This is to certify that Pankush Raina ,Mohit

Sharma,Nitish Kumar & Anu Ganjoo of B.C.A Part-

III under Examination Roll No’s……………..…….. , ………..…..……… and

…………..……..…has successfully completed the Minor Project work.

Project is entitled as:

Sub: - “PUNJAB NATIONAL BANKING SYSTEM”Session 2012-13

_____________ _________________ _________________

Mr. Surjeet Kumar Mrs. Archana Sharma ER. B.R.Verma (Project Guide) (Incharge of Computer Deptt) (Principal)

2

Page 3: PUNJAB NATIONAL BANK VB PROJECT

I take this opportunity to express my profound sense of gratitude and

respect to all those who helped me throughout this endeavor.

I owe my regards to Er. B.R. Verma , Principal of IMS, JAMMU for his

cooperation and valuable support and for giving us the opportunity to

undertake this Project and providing the necessary infrastructure.

I would like to express my heartfelt thanks to my revered and guide Mr.

Surjeet Kumar for his valuable guidance, encouragement and support

throughout my studentship under his guidance. All those informal

discussions were a beckon of light for us in entire duration of this work

last but not the least, I owe my over whelming gratitude to our family and

friends who gave us constant support and motivation to continue with this

endeavor.

PANKUSH RAINA

MOHIT SHARMA

NITISH KUMAR

ANU GANJOO

3

Page 4: PUNJAB NATIONAL BANK VB PROJECT

WE PANKUSH RAINA, MOHIT SHARMA, NITISH KUMAR & ANU GANJOO

STUDENTS OF BCA OF IMS, JAMMU HAVE DEVELOPED THIS PROJECT TO MAKE

OPERATIONS PERTAINING TO MAINTAIN THE RECORDS AND KEPT THE

INFORMATIONAS EASIER AND MORE EFFICIENT IN THE “PUNJAB NATIONAL

BANKING SYSTEM” THROUGHOUT THE DEVELOPMENT OF THIS PROJECT, OUR

CONSTANT AIM WAS TO DEPICT A REAL LIFE GOAL, I RESEARCHED ABOUT ALL

THE ASPECTS AND FINER DETAILS OF “PUNJAB NATIONAL BANKING SYSTEM”.

NOW WE ARE GOING TO INTRODUCE OUR PROJECT

GUIDE “MR. SURJEET KUMAR”. HE GUIDED US IN EVERY PERIOD OF MY

PROJECT. HE ALSO GIVES HIS VALUABLE SUGGESTION AND CONTINUES

ENCOURAGEMENT DURING THE COURSE OF THIS PROJECT WORK.

WE ARE REALLY VERY GREATFUL AND THANKFUL FOR THE

FULL CO- OPERATION OF OUR PRINCIPAL. “ER. B.R. VERMA”, BECAUSE OF HIS

KEEN GUIDENCE AND VALUABLE TIME DEVOTION HELPED US ALOT. WE GOT

THE CONFIDENCE TO COIMPLETE OUR PROJECT SUCCESSFULLY.

THANKS

PANKUSH RAINA

MOHIT SHARMA

NITISH KUMAR

ANU GANJOO

S.NO TITLEPAGE

NO

4

Page 5: PUNJAB NATIONAL BANK VB PROJECT

1.

INTRODUCTION OF THE PROJECT(i) GENERAL INTRODUCTION(ii) ABOUT THE PROJECT (iii) STRUCTURAL DIAGRAMS(iv) OBJECTIVES OF THE PROJECT(v) DESCRIPTION OF THE PROJECT

6

2. INTRODUCTION TO C++18

3. SOFTWARE AND HARDWARE REQUIREMENTS 25

4. SYSTEM DEVELOPMENT LIFE CYCLE (SDLC) 26

5.

SYSTEM ANALYSIS(i) FEASIBILITY STUDY (ii) ECONOMICAL FEASIBILITY(iii) TECHNICAL FEASIBILITY (iv) OPERATIONAL FEASIBILITY(v) LEGAL FEASIBILITY

27

6. FLOWCHART REPRESENTATION 30

7. DATA FLOW DIAGRAM (DFD) 31

8.

SYSTEM TESTING(i) QUALITY ASSURANCE AND TESTING (ii) DEBUGGING (iii) MODEL OF DEBUGGING PROCESS (iv) MODEL OF TESTING PROCESS

34

9. IMPLEMENTATION AND MAINTENANCE 39

10. SOURCE CODE 44

11. CODING50

12 OUTPUTS DESIGN 140

13 SCOPE AND RECOMMENDATIONS 146

14 BIBLIOGRAPHY 147

5

Page 6: PUNJAB NATIONAL BANK VB PROJECT

GENERAL INTRODUCTION

Bank safeguard money and valuables and provide loans, credit, and

payment services, such as checking accounts, money orders, and cashier’s

checks. Bank also may offer investment and insurance products. As a variety of

models for cooperation and integration among finance industries have emerged,

some of the traditional distinctions between Bank, insurance companies, and

securities firms have diminished. In spite of these changes, Bank continue to

maintain and perform their primary role—accepting deposits and lending funds

from these deposits.

There are several types of Bank, which differ in the number of services

they provide and the clientele they serve. Although some of the differences

between these types of Bank have lessened as they begin to expand the range of

products and services they offer, there are still key distinguishing traits.

Commercial Bank, which dominate this industry, offer a full range of services for

individuals, businesses, and governments. These Bank come in a wide range of

sizes, from large global Bank to regional and community Bank. Global Bank are

6

Page 7: PUNJAB NATIONAL BANK VB PROJECT

involved in international lending and foreign currency trading, in addition to the

more typical banking services. Regional Bank have numerous branches and

automated teller machine (ATM) locations throughout a multi-state area that

provide banking services to individuals. Bank have become more oriented toward

marketing and sales. As a result, employees need to know about all types of

products and services offered by Bank. Community Bank are based locally and

offer more personal attention, which many individuals and small businesses

prefer. In recent years, online Bank—which provide all services entirely over the

Internet—have entered the market, with some success. However, many

traditional Bank have also expanded to offer online banking, and some formerly

Internet-only Bank are opting to open branches.

Savings Bank and savings and loan associations, sometimes called thrift

institutions, are the second largest group of depository institutions. They were

first established as community-based institutions to finance mortgages for people

to buy homes and still cater mostly to the savings and lending needs of

individuals.

Credit unions are another kind of depository institution. Most credit

unions are formed by people with a common bond, such as those who work for

the same company or belong to the same labor union . Members pool their

7

Page 8: PUNJAB NATIONAL BANK VB PROJECT

savings and, when they need money, they may borrow from the credit union,

often at a lower interest rate than that demanded by other financial institutions.

Federal Reserve Bank are Government agencies that perform many

financial services for the Government. Their chief responsibilities are to regulate

the banking industry and to help implement our Nation’s monetary policy so our

economy can run more efficiently by controlling the Nation’s money supply—the

total quantity of money in the country, including cash and bank deposits. For

example, during slower periods of economic activity, the Federal Reserve may

purchase government securities from commercial Bank, giving them more money

to lend, thus expanding the economy. Federal Reserve Bank also perform a

variety of services for other Bank. For example, they may make emergency loans

to Bank that are short of cash, and clear checks that are drawn and paid out by

different Bank.

Interest on loans is the principal source of revenue for most Bank, making

their various lending departments critical to their success. The commercial

lending department loans money to companies to start or expand a business or to

purchase inventory and capital equipment. The consumer lending department

handles student loans, credit cards, and loans for home improvements, debt

8

Page 9: PUNJAB NATIONAL BANK VB PROJECT

consolidation, and automobile purchases. Finally, the mortgage lending

department loans money to individuals and businesses to purchase real estate.

The money to lend comes primarily from deposits in checking and savings

accounts, certificates of deposit, money market accounts, and other deposit

accounts that consumers and businesses set up with the bank. These deposits

often earn interest for the owner, and accounts that offer checking provide an

easy method for making payments safely without using cash. Deposits in many

Bank are insured by the Federal Deposit Insurance Corporation, which ensures

that depositors will get their money back, up to a stated limit, if a bank should

fail.

Technology is having a major impact on the banking industry. For

example, many routine bank services that once required a teller, such as making a

withdrawal or deposit, are now available through ATMs that allow people to

access their accounts 24 hours a day. Also, direct deposit allows companies and

governments to electronically transfer payments into various accounts. Further,

debit cards, which may also used as ATM cards, instantaneously deduct money

from an account when the card is swiped across a machine at a store’s cash

register. Electronic banking by phone or computer allows customers to pay bills

and transfer money from one account to another. Through these channels, bank

9

Page 10: PUNJAB NATIONAL BANK VB PROJECT

customers can also access information such as account balances and statement

history. Some Bank have begun offering online account aggregation, which

makes available in one place detailed and up-to date information on a customer’s

accounts held at various institutions.

Other fundamental changes are occurring in the industry as Bank diversify

their services to become more competitive. Many Bank now offer their customers

financial planning and asset management services, as well as brokerage and

insurance services, often through a subsidiary or third party. Others are beginning

to provide investment banking services that help companies and governments

raise money through the issuance of stocks and bonds, also usually through a

subsidiary. As Bank respond to deregulation and as competition in this sector

grows, the nature of the banking industry will continue to undergo significant

change.

10

Page 11: PUNJAB NATIONAL BANK VB PROJECT

PUNJAB NAIONAL BANKING OPERATIONS

Punjab National Banking Operations provides cash management services for

revenue collection, payments and borrowing services. This involves maximizing

financial returns and meeting payment obligations for annual cash flows .

This project is basically an attempt to automate the operations related to

personal / Home banking .

These operations include:

1. ADD NEW ACCOUNT

2. DEPOSIT MONEY

3. WITHDRAW MONEY

4. VIEW ACCOUNT

5. DELETE ACCOUNT

6. SEARCH ACCOUNT

7. HELP

8. EXIT

All these operations are required in the personal segment of banking. An attempt

has been made to computerize all activities related to personal banking so as to

satisfy the personal needs of users.

The project is developed using C++ an Object Oriented Programming Language

based on Real World Modeling Concept.

11

Page 12: PUNJAB NATIONAL BANK VB PROJECT

Structural Diagrams

Structural Diagrams represent static application structure, and include the following types of diagrams:

o Class Diagram, o Object Diagram, o Component Diagram, o Deployment Diagram.

The Structural Diagrams is the static architectural representation of a software

project and often a good starting point.

It defines the overall object structure of the software system.

CLASS DIAGRAM

A class is represented as follows:

The Account is the name of the class representing the definition of an

Account.

The Value is an attribute of the Account representing the amount of

money in the account.

Withdraw and Deposit are methods to Add/Delete money to the

account.

The − and + signs are visibility indicators used to show encapsulation.

The minus says that Value is a private member of class Account and can

only be seen by methods of the Account class. The plus represents public

12

Page 13: PUNJAB NATIONAL BANK VB PROJECT

members, so Withdraw and Deposit can be accessed outside the Account

class.

The void after the colon are the return types from the class.

Relationships between classes can be represented as:

The Inheritance is represented by a triangle and Savings Account is a

subclass of Account, inheriting all of the Attributes and Operations of the

Account Class.

The Add New Account is a method added to the class "Savings Account".

Aggregation is represented by a diamond. A Bank has many Accounts. The

asterisk near the Accounts represents many and the 1 near the bank represents

one.

13

Account

- Value: float

+ Withdraw (float): void+ Deposit (float): void

Saving account

+ Add New Account

Page 14: PUNJAB NATIONAL BANK VB PROJECT

Thus, there is a one to much relationship between Bank and Accounts.

Aggregation is a whole-part relationship. A Bank has Accounts, so the diamond

is positioned near the container to represent the accounts are the parts of the

bank. Note that we also added another subclass Checking Account to represent

another type of account in are system.

The above diagram shows that our bank has many accounts some of which are

savings accounts and some of which are checking accounts.

Aggregation is a bidirectional association containing references in both

directions. A Bank has many Accounts and contains references to all of them.

Similarly, any Account contains a reference to corresponding bank.

We can continue the example and introduce an aggregation relationship between

a bank account and an employee.

14

Page 15: PUNJAB NATIONAL BANK VB PROJECT

An employee may have many Accounts and contains references to all of such

accounts. Any Account contains a reference to corresponding bank and to its

owner (i.e. to an Employee).

If a relationship exists in only one direction, it is called Navigability .

An employee may have many Accounts and contains references to all of such

accounts. Any Account contains a reference to corresponding bank, but accounts

do not contain references to owners (i.e. to Employees).

15

Page 16: PUNJAB NATIONAL BANK VB PROJECT

Project to be developed is going to achieve the following objectives:

Helps in eliminating the individual maintenance of the record storage of

bank accounts.

Helps in reducing the maintenance time by automatically shifting/storing

the information in relevant modules.

Helps in fast retrieval or instant availability of information required.

Provides flexibility to bring the required change in a record in case of

modification or deletion or seeking information of queries.

Helps in reducing manual power requirement to a single person i.e.

computer operator.

Helps in avoiding confusion generating/ arising due to the relevant data of

a system not being recorded/posted on the register, in case the transaction

made by a account holder.

16

Page 17: PUNJAB NATIONAL BANK VB PROJECT

PROJECT CATEGORY

This project comes under Object Oriented Programming (OOPs)

category. The fundamental idea behind using Object Oriented Language (i.e. C+

+) is to combine into a single unit both data and the methods that operate on that

data. Moreover, the concept of data hiding and stacks in C++ makes it more

suitable for this project work. As in this project, in order for the existence of

PUNJAB NATIONAL BANKING SYSTEM there is need to implement it using

the concept of Procedural or Object Oriented Languages. Above all the only way

to make the data accessible by their respective functions or modules is by

implementing the concept of classes and objects making the data hidden, so that

it is safe from accidental alteration and provides the security features.

17

Page 18: PUNJAB NATIONAL BANK VB PROJECT

C++ programming language was developed at AT&T bell laboratories.

This language was developed by “BEJARNE STROUSTRUP” in early 1980’s.

BEJARNE was working in Simulate 67 (an Object Oriented Language) and C

language. He wanted to create a language that should combine the features of

both of these languages. The result of his quest was the development of C++. He

found that “C” language is lacking to model real life problems in programming.

The original name of C++ was “C with Classes”. Later, “Rick Mascittii”

renamed it to “C++”. This name was inspired from and increment operator (++)

of C++.

Presently, C++ is a very popular programming language having its own

committee of reason behind the success of C++. The object-oriented technology

is the main reason behind the success of C++. With this, it is very easy to mode

the real world problems into programming language.

18

Page 19: PUNJAB NATIONAL BANK VB PROJECT

The programming using C, FORTRAN, PASCAL and COBOL is referred to as

“Procedural Programming” or “Structural Programming”. In procedural

programming, a problem is considered as a sequence of things to be done. The

main stress is given on processing of tasks. To accomplish these tasks, a number

of functions area written. The primary focus of this programming is on functions.

Procedural programming consists of writing a list of instructions that are

organized in groups, called “FUNCTIONS”. One or more functions are created

to accomplish one or more tasks. In procedural programming, top-down approach

is followed to break a large program into smaller functions. That means, a larger

problem is subdivided into a number of functions such that each function solves a

part of the problem.

19

Function 3

Main Program

Function 2Function 1

Function 4 Function 5

Function 6

Page 20: PUNJAB NATIONAL BANK VB PROJECT

Due to procedural; nature, it becomes very difficult to point that what data are

used by which function at a moment of time. To see this, we have to refer to data

structures. By the term “data structures”, we mean that the method used to store

access and organize the program into main memory. The data of a procedural

program is handled with the help of local and global variables. Global variables

area accidentally tempered by one or more functions at a time. Changing the

program is very problematic as functions are dependent on each other. When we

change one function, other has to be changed. The other serious problem of

procedural programming is that it cannot model real world problems into

programs.

OBJECT ORIENTED PROGRAMMING

Object oriented programming was designed to remove the flaws of procedural

programming. Object oriented programming paradigm (model) treats data as a

critical element in the program and does not allow it to move freely around the

system. Data is tied more closely to functions. Data is protected from accidental

modification from other functions. Object oriented programming combines data

and functions acting on the date into a single entry, called Object. Object oriented

programming allows accessing of data only through a set of functions.

20

Page 21: PUNJAB NATIONAL BANK VB PROJECT

CHARACERSTICS OF C++

In object oriented programming, the emphasis is given to data, rather than actions

or functions. Here, the programs are divided into objects and the data structures

are created in a manner that they characterize objects. The functions that operate

on single type of objects are tied up together, by making them the members of the

same class. In OOP, the data of an object is protected and hidden from the data of

other objects. The bottom up approach is followed while modeling programs.

It is very easy to add new functions to the program. Following figure

depicts the organization of data and functions in a C++ program.

1. OBJECT :

Objects are basic runtime entities of an object oriented system. An object

can represent any person, place or thing our world. Functions are created to

represent the actions of an object. In oops, a programming problem is

analyzed in terms of objects and communication between them. Every

object contains data and code to manipulate the data. When a program is

executed, the objects communicate with each other by passing messages.

Following are the main characteristics of objects.

21

Page 22: PUNJAB NATIONAL BANK VB PROJECT

(1) Behavior: The behavior of the object describes that how it changes its states

and how it communicates with other objects.

(2) Identify: The identity of the object is a unique property that distinguishes it

from Other objects.

(3) For example, breathing property of living objects differentiates them

from non-living objects. Various operations can be performed on objects.

They include changing the state of object, accessing its current state,

creating and / or initializing objects and destroying objects.

2. CLASS :

A Class is a collection of many similar objects. These objects share same

properties and different objects can be derived from a class. A class

defines some properties and actions that are shared by all objects of that

class. For example, “Vehicle” is a class that contains properties which are

Object : CARDATAColorModelEngine-Vol.Fuel-typeFUNCTIONSSpeedFuel-eff.Cost-per-Km

22

Page 23: PUNJAB NATIONAL BANK VB PROJECT

common for all vehicles The objects of vehicle class may be car, bus, truck

etc. Classes are used to implement encapsulation and abstraction.

3. DATA ABSTACTION :

Abstraction refers to the act of representing the essential features, without

including the inner explanations. In Object Oriented Programming, users

are just aware of objects functions and their purpose. They are not aware of

the internal structure and working of the functions and objects. The

phenomena of hiding the access to internal variables from the user and

only providing the access to functions, is called as abstraction This is very

similar to a car driver, who knows that pressing the accelerator after

putting the car in gear will move the car; but how it actually happens is

hidden from him.

4. ENCAPSULATION :

Data encapsulation is the process of wrapping of data and functions into a

single unit, called “Cass”. Data abstraction is implemented with the help of

data encapsulation. The private date of a class is hidden from all other

classes and objects that are outside the body of that class. You will study

the concept of encapsulation in the coming units of this book.

23

Page 24: PUNJAB NATIONAL BANK VB PROJECT

5. POLYMORPHISM

In general sense, polymorphism means the quality of having more than one

form. In context of Object Oriented Programming, polymorphism refers to

the fact that different objects react differently to the same massage or

operation. For example, some function.

If called with two arguments gives separate results than when it is called

with three arguments. A function “SUIM” can b created in such a manner

that it will compute sum if the arguments are numeric and it will

concatenate, if we pass stings as parameters Similarly operators can also

react differently by using operator overloading.

24

Page 25: PUNJAB NATIONAL BANK VB PROJECT

Operating

System

Windows XP ,2003 or higher

versions of Windows

Application

used

Turbo C++

System Development revolves around a life cycle that begins with the recognition of user needs. In order to develop good software, it has to go through

Hard Disk 250 GB or Higher Capacity

Compact Disk 700 MB

Mouse OPTICAL or USB etc

RAM 512 MB or higher

Processor Pentium-IV or higher

Monitor 17 inch Colored or TFD

Others CD-ROM etc

25

Page 26: PUNJAB NATIONAL BANK VB PROJECT

different phases. There are various phases of the System Life Cycle of this project. There are different models for software development, which depict these phases. We decided to use waterfall model, the oldest and the most widely used paradigm for software engineering. The Various relevant stages of the System Life Cycle of this Application Tool are depicted in the following flow diagram.

26

SYSTEM ANAYLSIS

SYSTEM ANAYLSIS

SYSTEM DESIGN

CODING

SYSTEM TESTING

SYSTEM IMPLEMENTATION

SYSTEM MAINTENANCE

Page 27: PUNJAB NATIONAL BANK VB PROJECT

SYSTEM ANALYSIS

The System Analysis Phase is considered as one of the most

important phases in the system development life cycle (SDLC). It is extremely

important that the developer should undergo system study of the existing system

thoroughly because otherwise it is impossible to build the system that will satisfy

the needs of the user. This study enables the developer to light so that he may

know exactly what not to do while building the candidate system.

Requirement Analysis must be done to understand the problem that

the software system is to solve e.g. the problem could be automating an existing

manual system or developing a completely new automated system or a

combination of the two. For a large system, having a large number of features as

there has the need to perform many different tasks. The emphasis in requirement

analysis is to identify what are the needs of the system and not how the system

achieves or gets its goal.

The developer usually does not understand the issues involved in software

systems, this causes a communication gap that needs bridging adequately during

this analysis.

27

Page 28: PUNJAB NATIONAL BANK VB PROJECT

FEASIBILITY STUDY All projects are feasible if given unlimited resources and infinite time!

Unfortunately, the development of a computer based system or project is likely to

be plagued by scarcity of resources and difficult delivery dates. It is both

necessary and prudent to evaluate the feasibility of a project at the earliest.

Months or years of efforts, thousands or millions of dollars, and untold

professional embarrassment can be averted if defective system is recognized

early in the definition phase.

Feasibility and risk analysis are related in many ways. If project risk is

much the feasibility of producing quality software is reduced. During product

engineering, however, we concentrate our attention on four primary areas of

interest.

Economic Feasibility An evaluation development cost weighed against the ultimate income or

benefit derived from the developed system or product. Overheads regarding

routine activities (i.e. Paper Work, various types of diaries/Organizers etc) are

reduced by maintaining all contact details on the computer.

28

Page 29: PUNJAB NATIONAL BANK VB PROJECT

Technical Feasibility

A study of function, performance and constraints that can affect the

ability to achieve an acceptable system. The system developed provides fast,

accurate, reliable and interactive mode of executing a transaction.

Operational Feasibility

It tells about the handling of the software by the user of the system for

the routine activities

Legal Feasibility

A determination of infringement, violation or liability that can result

from development of the system. A project designed does not violate any rule as

specified for this activity.

29

Page 30: PUNJAB NATIONAL BANK VB PROJECT

30

Enter Acc No to Withdraw:Acc. No:Person NameWithdraw money

ENTER CHOICE

ADD NEW ACCOUNT WITHDRAW MONEY

Account No:Enter Name:Opening Date:Curr. Balance:

STOP

START

DISPLAY THE INFORMATION

DEPOSIT MONEY

Enter Acc. No to Deposit:Acc. No:Person NameDeposit money

Page 31: PUNJAB NATIONAL BANK VB PROJECT

DFD has the purpose of clarifying system requirements & identifying major

transformations that will help in system design of a module.

There are four symbols used in DFD. They are:-

A Square: - defines Source or destination of data.

An Arrow: - Identifies data flow– data in motion.

A circle: - transforms incoming data into outgoing data.

An open rectangle: - A data in store or a data at rest.

DECISION TABLES

It is the table of contingencies for defining a problem and the actions to be taken.

It is a single representation of the relationships between conditions and actions

DATA DICTIONARY

It is a structured repository of data about data. It is a set of all definitions of DFD

elements and Data Structures. .Data Dictionary is an important step in building a

data base.

31

Page 32: PUNJAB NATIONAL BANK VB PROJECT

ZERO LEVEL DFD

ZERO LEVEL DFD

32

BRANCHACCOUNT

PUNJAB NATIONAL BANK

CUSTOMER

Page 33: PUNJAB NATIONAL BANK VB PROJECT

FIRST LEVEL DFD

33

PUNJAB

NATIONAL BANK

ADD NEW ACCOUNT

WITHDRAW

MONEY

SEARCH ACCOUNT

VIEW

ACCOUNTSDELETE

ACCOUNT

DEPOSIT MONEY

Page 34: PUNJAB NATIONAL BANK VB PROJECT

QUALITY ASSURANCE AND TESTING

Software quality assurance is a check to prove that the program works as

expected. Testing should locate any previously undetected errors that might

hamper the smooth functioning of the system. In this phase we try to make the

system fail and then continue testing till we cannot deliberately make the system

fail anymore.

Debugging

If defects are there in the system, they must be located and removed. This process

is called Debugging. Defects in the code must be located and the program

modified to meet its requirement. Testing must be repeated to ensure that the

change has been made correctly.

The following diagram makes understand the process of

debugging:

34

Locate

error

Design

error

Repair

error

Re-test error

Page 35: PUNJAB NATIONAL BANK VB PROJECT

The Debugging process

MODEL OF DEBUGGING PROCESS

Testing Process

System should be build of sub-systems that are build out of modules,

which are composed of procedures and functions. The testing proceeds in

stages where it is carried out incrementally in conjunction with the system

implementation.

The most widely used testing process consists of five stages illustrated in

the figure below:

35

Page 36: PUNJAB NATIONAL BANK VB PROJECT

MODEL OF TESTING PROCESS

Testing and Safe Aspects

In order to assure quality of the project in accordance with the plan, following

Software Quality measures are to be taken:

Formal Technical Reviews

Individual Reports

Regular Brainstorming Sessions

Unit Testin

g

Module

Testing

Subsystem Testing

System Testing

Acceptance

Testing

36

Page 37: PUNJAB NATIONAL BANK VB PROJECT

Peer Reviews

Coding Standard

Structural multilevel testing

Testing

No program or system design is perfect. Communication between the user and

the designer is not always complete or clear. Time is usually short. The result is

errors and more errors. The number and native of errors in a new design depend

on several factors:

Communication between the user and designer.

The programmer’s ability to generate a code that reflects exactly the

system specifications.

The time frame of the design.

Theoretically, a newly designed system should have all the pieces in working

order. But in reality, each piece works independently. The purpose of system

testing is to consider all the likely variations to which it will be subjected and

then push the system to its limits. It is very tedious but necessary in system

development.

Types of Testing Process:

Unit testing is testing changes made in an existing or new program.

37

Page 38: PUNJAB NATIONAL BANK VB PROJECT

Sequential or series testing is checking the logic of one or more programs

in the candidate system, where the output of one will affect the processing

done by another program.

System testing is executing a program to check logic changes made in it

and with the intention of finding errors (making the program fail). Effective

testing does not guarantee reliability. Reliability is a design consideration.

Positive testing is making sure that the new program, in fact, processes

certain transactions according to specifications

Acceptance testing is running the system with live data.

Testing is a process of executing program with the intention of uncovering

errors in it. Though testing cannot show absence of errors but by showing

their presence, it is considered that these are not present or at least have been

minimized a lot.

The following considerations that were taken for testing the modules:

Preplanning of testing and test case design.

Conformance of requirements.

Gradual and incremental representations of test cases for the whole

domain.

38

Page 39: PUNJAB NATIONAL BANK VB PROJECT

IMPLEMENTATION

AND

MAINTENANCE

IMPLEMENTATION

An important aspect of system analyst’s job is to make sure that the new design

implementation meets the standard. The term implementation has different

meanings, ranging from conversion of basic applications to complete replacement

of computer systems. The procedure however is virtually the same.

Implementation here means the process of converting a new or a revised system

design into an operational one. Conversion is one aspect of implementation. The

other aspects are post implementation and software maintenance.

Types of Implementation

Implementation of computer system to replace manual system. The

problem encountered is converting files, training users, creating accurate files

and verifying printouts for integrity.

39

Page 40: PUNJAB NATIONAL BANK VB PROJECT

Implementation of a computer system to replace an existing one. This is

usually a difficult one. If not properly planned, there can be many problems.

Some large computer systems have taken as long as a year to convert.

Implementation of modified application to replace an existing one. Using

the same computer, this type of conversion is relatively easy to handle,

provided there are no major changes in the files.

SOFTWARE MAINTENANCE

Maintenance is enigma of system development. It holds the software

industry captive, typing up the programming resources. Analyst’s and

programmers spend far more time in maintaining the program than they do

writing them. Maintenance accounts for 50-80 % of total system development.

The federal government alone spends more than $1.3 billion a year on software

maintenance. Whereas the cost of hardware has steadily declined, the cost of

producing programs has skyrocketed, e.g., Ten years ago the development cost of

a department of defense (DOD) project averaged $ 75 per line of programming

instructions, whereas maintenance cost ran as high as $ 4,000 per line.

This problem occurs across industry largely because software is a

handmade product designed in an ad hoc fashion with few standards; it comes out

late, is purely documented, and therefore is difficult to maintain.

40

Page 41: PUNJAB NATIONAL BANK VB PROJECT

Problems in Maintenance

Maintenance is not as rewarding and exciting as developing systems. It is

perceived as requiring neither skill nor experience.

Users are not fully cognizant of the maintenance problem or its high cost.

Few tools and techniques are available for maintenance.

A good test plan is lacking.

Standards, procedures and guidelines are purely defined and enforced.

Maintenance is viewed as a necessary evil, often delegated to junior

programmers. There is practically no maintenance manager’s job

classification in MTS field.

Programs are often maintained without care, for structure and

documentation.

There are minimal standards for maintenance.

Programmers anticipate that they will not be in their current commitment

by the time their program goes into the maintenance cycle.

Most programmers view maintenance as low-level drudgery. After they

develop an application, they spent years locked in maintaining it. Eventually,

boredom sets in, with subsequent turn over and loss of expertise necessary to

41

Page 42: PUNJAB NATIONAL BANK VB PROJECT

maintain the system. It is obvious that the more carefully the system is thought

out and developed, with attention paid to external influence over a reasonable

lifetime, the less maintenance will be required.

42

Page 43: PUNJAB NATIONAL BANK VB PROJECT

PRIMARY ACTIVITIES OF

MAINTENANCE PROCEDURE

Request for

System

Request System System and

Program Documentation

SpecifyRequired

Modification

Acquire SourceProgram StatementPrintout from Bank

Acquire Source

Make RequiredChanges to Program

And Systems

Test changes

Notify User ofProject

Completion

Return ModifiedDocumentation

To Bank

Submit test forUser Approval

Results forProgram UserDocumentation

ModificationsRequirements

Source Program

StatementPrintout

ProjectCompletion

Notice

1

1

43

Page 44: PUNJAB NATIONAL BANK VB PROJECT

SOURCE CODE

/* The Bank makes certain computerized facilities in their bank to

implement customer records and their daily transaction records.

The bank keeps certain information as follow:

Bank.dat :

Account NO :

Enter name :

Opening Date :

Curr Balance :

When the any customer will be create an account, the bank will

keep the above fields in their Bank.dat file as master account holder.

While inputing the data record the following validation will check:

- the account numbers will generate automatically

- the name, address should not blank

- transaction date will be the system date/current date

44

Page 45: PUNJAB NATIONAL BANK VB PROJECT

- initial deposit for any account is not required as account will be opened at

Zero balance

- Daily transaction will be entered either the word

Write a menu driven program for making a daily transaction process for the displaying

following menu options

1. ADD NEW ACCOUNT

2. DEPOSIT MONEY

3. WITHDRAW MONEY

4. VIEW ACCOUNT

5. DELETE ACCOUNT

6. SEARCH ACCOUNT

7. HELP

8. EXIT

This project is developed using C++ class concepts and having number of different

user defined function (UDFs) as follows:

void add(bank *b)

This function is used to append new account details into the Bank.dat file. This

function receives all the fields as paramenter way

45

Page 46: PUNJAB NATIONAL BANK VB PROJECT

from the new_account() function and adds in the data file.

Void view(bank *b)

This function is used to display all the account data in the screen in which you have

two options to view account one is “one by one” and other is “view all” and back to

return back. Which displays the accountno#, name, opening date and

their respective balance amount in bank. Also show the total bank balance in the

screen. All the records are extracted from

bank.dat data file.

Void searched(bank *b)

This function is used to search account of the customer in which you have three

options

1. Search account

2. search name

3. search case

4. Back

In the first option “search account” is used to search account by account number and

in the second option “search name” is used to search account by customer name and

in the third option search case you will be search account by the first letter of the

account holder. And the last option is used to return back to main menu.

46

Page 47: PUNJAB NATIONAL BANK VB PROJECT

Void del(bank *b)

This function is used to delete the account details from bank.dat data file. This is a

copy method which

transfers all the records except deleted accno#. And on the same way the records are

reversed from the TEMP.dat file

to the original data file bank.dat.

void deposit(bank *b)

When there is a fresh transaction happens on an existing account to deposit . then

the respective balance has to added

in thebank.dat data file. While the transactions complete, the balance amount is

overwritten in the

data file. This technique occurs by locating the position in the data file only.

Void withdraw(bank *b)

When there is a fresh transaction happens on an existing account to withdraw . then

the respective balance has to subtracted

in thebank.dat data file. While the transactions complete, the balance amount is

overwritten in the

47

Page 48: PUNJAB NATIONAL BANK VB PROJECT

data file. This technique occurs by locating the position in the data file only.

Void menu()

This function is used to display menu in whish following options will be displayed

1. ADD NEW ACCOUNT

2. DEPOSIT MONEY

3. WITHDRAW MONEY

4. VIEW ACCOUNT

5. SEARCH ACCOUNT

6. HELP

7. EXIT

Void helpmenu()

This option is used for the help. It displays the following options.

INTRODUCTION

HOW TO USE

ABOUT BANK

BACK

In the INTRODUCTION it gives the introduction about the software and in the second

option it tell you to how to use the software and the third option developer details is

available. And last option is used to return to the main menu.

48

Page 49: PUNJAB NATIONAL BANK VB PROJECT

Void password()

This function is used for login window program. In which you have to enter the

password to operate the software.

Void splash()

This function is use to design the welcome screen.

49

Page 50: PUNJAB NATIONAL BANK VB PROJECT

/* HEADER FILES */

#include<graphics.h>

#include <conio.h>

#include <stdio.h>

#include <dos.h>

#include <string.h>

#include <stdlib.h>

#include <iostream.h>

#include <io.h>

#include <process.h>

#include <ctype.h>

#include<graph.h>

/* RECTANGLE DESIGN HEADER FILE */

#include "Box.h"

#include "Valid.h"

#define MIN 2

#define NUM 5

50

Page 51: PUNJAB NATIONAL BANK VB PROJECT

#define MAX 20

/* DEFINE STRUCTURE */

struct bank

{

char id[NUM];

char name[MAX];

double dep, with, bal;

int day, month, year;

int status;

}b; //Structure's Variable

/* DEFINE FUNCTIONS */

/* WELCOME SCREEN */

void splash();

/* LOGIN WINDOW */

void password();

/* MENUES OF PROGRAM */

void check_id(char *,int);

void check_name(char *,int);

51

Page 52: PUNJAB NATIONAL BANK VB PROJECT

void menu(); // MAIN MENU

void viewmenu(); // VIEW RECORDS MENU

void searchmenu(); // SEARCH RECORD MENU

void helpmenu(); // PROGRAM'S HELP MENU

/* DATABASE HANDLING */

void add(bank *b); // OPENING ACCOUNT

void deposit(bank *b); // DEPOSITING MONEY

void withdraw(bank *b); // WITHDRAWING MONEY

void view(bank *b); // RECORDS NAVIGATOR

void viewall(bank *b); // VIEW ALL ACCOUNT LIST

void print(bank *b); // PRINT ALL ACCOUNTS INFO

void delet(bank *b); // DELETE SPECIFIC RECORDS

void searchid(bank *b); // SEARCH ACCOUNT BY NO.

void searchname(bank*b);// SEARCH ACCOUNT BY NAME

void searchcase(bank*b);// SEARCH ACCOUNT BY CHARACTER

/* HELP FILES */

void intro(); // INTRODUCTION TO PROGRAM

void usage(); // HOE TO USE PROGRAM

/* ABOUT PROGRAM */

void about(); // A NOTE ABOUT THE AUTHOR

/* CLOSING THE PROGRAM */

void quit(); // TERMINATING THE PROGRAM

52

Page 53: PUNJAB NATIONAL BANK VB PROJECT

/* MAIN FUNCTION */

void main()

{

textbackground(6);

//loadgraph();

//start();

int gdriver = DETECT, gmode, errorcode;

initgraph(&gdriver, &gmode, "");

closegraph();

splash();

}

void add(bank *b)

{

FILE *f;

char ch;

b->bal = 0;

f = fopen("Bank.dat","ab");

53

Page 54: PUNJAB NATIONAL BANK VB PROJECT

if (f != NULL)

{

do

{

textcolor(GREEN);

clrscr();

_setcursortype(_SOLIDCURSOR); // For Solid cursor.

box(12,3,69,5);

gotoxy(31,4);

textcolor(8 + BLINK);

cprintf("PUNJAB NATIONAL BANK");

box(16,7,65,20);

textcolor(CYAN);

gotoxy(29,7);

cprintf(" ++ OPEN NEW ACCOUNT ++ ");

gotoxy(27,10);

cprintf("ACCOUNT NO : ");

check_id(b->id, NUM);

54

Page 55: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(27,12);

cprintf("ENTER NAME : ");

check_name(b->name, MAX);

{

struct date d;

getdate(&d);

b->day = d.da_day;

b->month = d.da_mon;

b->year = d.da_year;

}

_setcursortype(_NOCURSOR);

gotoxy(27,14); cputs("OPENING DATE : ");

gotoxy(42,14); cout<<b->day<<"-"<<b->month<<"-"<<b->year;

gotoxy(27,16); cprintf("CURR BALANCE : %.00lf",b->bal);

textcolor(YELLOW);

gotoxy(19,19); cputs(b->id);

gotoxy(28,19); cputs(b->name);

55

Page 56: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(48,19); cprintf("%d-%d-%d",b->day,b->month,b->year);

gotoxy(62,19); cprintf("%.00lf",b->bal);

fwrite(b, sizeof(struct bank), 1, f);

fclose(f);

textcolor(CYAN);

gotoxy(18,23);

cprintf("DO YOU WANT TO ENTER ANOTHER RECORD? [Y]/[N] : ");

ch = getche();

} while(ch =='Y' || ch == 'y');

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

gotoxy(28,13);

56

Page 57: PUNJAB NATIONAL BANK VB PROJECT

cputs("*** ERROR OPENING FILE ***");

getch();

}

menu();

}

void view(bank *b)

{

FILE *f;

char ch;

f = fopen("Bank.dat","rb");

//while(ch != 27){

if(f != NULL)

{

clrscr();

while( fread(b, sizeof(struct bank), 1, f))

57

Page 58: PUNJAB NATIONAL BANK VB PROJECT

if(b->status == 0)

{

//Calling All Records Saved in the File

textcolor(GREEN);

clrscr();

box(12,3,69,5);

gotoxy(31,4);

textcolor(CYAN + BLINK);

cprintf("PUNJAB NATIONAL BANK");

box(16,7,65,20);

textcolor(CYAN);

gotoxy(29,7);

cprintf(" ++ VIEW ALL ACCOUNT ++ ");

_setcursortype(_NOCURSOR);

gotoxy(27,10);

cprintf("ACCOUNT NO : %s",b->id);

58

Page 59: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(27,12);

cprintf("PERSON NAME : %s",b->name);

gotoxy(27,14);

cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b-

>year);

gotoxy(27,16);

cprintf("CURR BALANCE : %.00lf",b->bal);

textcolor(YELLOW);

gotoxy(19,19); cputs(b->id);

gotoxy(26,19); cputs(b->name);

gotoxy(46,19); cprintf("%d-%d-%d",b->day,b-

>month,b->year);

gotoxy(59,19); cprintf("%.00lf",b->bal);

getch();

}

if(b->status == 1)

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

59

Page 60: PUNJAB NATIONAL BANK VB PROJECT

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** RECORD NOT FOUND ***");

getch();

}

fclose(f);

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

} /*

if (ch == 27)

break;

viewmenu();

} */

viewmenu();

60

Page 61: PUNJAB NATIONAL BANK VB PROJECT

}

void viewall(bank *b)

{

FILE *f;

int r = 11;

double n;

f = fopen("Bank.dat", "rb");

if (f != NULL)

{

textcolor(GREEN);

clrscr();

box(12,2,69,4);

_setcursortype(_NOCURSOR);

gotoxy(31,3);

textcolor(CYAN + BLINK);

61

Page 62: PUNJAB NATIONAL BANK VB PROJECT

cprintf("PUNJAB NATIONAL BANK");

box(8,7,73,24);

textcolor(CYAN);

gotoxy(25,7);

cprintf(" ++ ALL RECORDS OF DATABASE ++ ");

textcolor(RED);

gotoxy(10,9);

cprintf("ACCOUNT NO. NAME OPENING DATE BALANCE");

n = filelength (fileno(f)) / sizeof(struct bank);

while ((fread(b, sizeof(struct bank), 1, f) == 1))

{

if(b->status == 0)

{

if(r == 22)

{

textcolor(YELLOW);

62

Page 63: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(10,23);

cprintf("PRESS ANY KEY TO CONTINUE...");

getch();

textcolor(GREEN);

clrscr();

box(12,2,69,4);

gotoxy(31,3);

textcolor(CYAN + BLINK);

cprintf("PUNJAB NATIONAL BANK");

box(8,7,73,24);

textcolor(CYAN);

gotoxy(25,7);

cprintf(" ++ ALL RECORDS OF DATABASE ++ ");

textcolor(RED);

gotoxy(10,9);

63

Page 64: PUNJAB NATIONAL BANK VB PROJECT

cprintf("ACCOUNT NO. NAME OPENING DATE

BALANCE");

r = 11;

}

else

{

textcolor(CYAN);

gotoxy(12,r);

cputs(b->id);

gotoxy(26,r);

cputs(b->name);

gotoxy(50,r);

cprintf("%d-%d-%d",b->day,b->month,b->year);

gotoxy(65,r);

cprintf("%.00lf",b->bal);

r++;

64

Page 65: PUNJAB NATIONAL BANK VB PROJECT

}

}

}

fclose(f);

textcolor(YELLOW);

gotoxy(10,23);

cputs("END OF RECORDS");

gotoxy(54,23);

cputs("TOTAL RECORDS : ");

cout<<n;

getch();

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

65

Page 66: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

}

viewmenu();

}

void searchid(bank *b)

{

int i;

char no[NUM];

FILE *f;

textcolor(GREEN);

clrscr();

_setcursortype(_SOLIDCURSOR);

f = fopen("Bank.dat","rb");

66

Page 67: PUNJAB NATIONAL BANK VB PROJECT

if (f != NULL)

{

box(12,3,69,5);

gotoxy(31,4);

textcolor(CYAN + BLINK);

cputs("PUNJAB NATIONAL BANK");

box(16,7,65,22);

textcolor(CYAN);

gotoxy(30,7);

cputs(" ++ SEARCH ACCOUNT ++ ");

gotoxy(24,9);

cputs("ENTER ACCOUNT NO. TO SEARCH : ");

check_id(no, NUM);

_setcursortype(_NOCURSOR);

rewind(f);

67

Page 68: PUNJAB NATIONAL BANK VB PROJECT

while(fread(b, sizeof(struct bank), 1, f))

{

if (strcmp(no, b->id) == 0)

{

i++;

gotoxy(27,12);

cprintf("ACCOUNT NO : %s",b->id);

gotoxy(27,14);

cprintf("PERSON NAME : %s",b->name);

gotoxy(27,16);

cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b->year);

gotoxy(27,18);

cprintf("CURR BALANCE : %.00lf",b->bal);

textcolor(YELLOW);

gotoxy(19,21); cputs(b->id);

gotoxy(26,21); cputs(b->name);

gotoxy(46,21); cprintf("%d-%d-%d",b->day,b->month,b->year);

gotoxy(59,21); cprintf("%.00lf",b->bal);

fflush(stdin);

getch();

68

Page 69: PUNJAB NATIONAL BANK VB PROJECT

}

}

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

}

fclose(f);

searchmenu();

}

void searchname(bank *b)

69

Page 70: PUNJAB NATIONAL BANK VB PROJECT

{

int i;

char nm[MAX];

FILE *f;

textcolor(GREEN);

clrscr();

_setcursortype(_SOLIDCURSOR);

f = fopen("Bank.dat","rb");

if (f != NULL)

{

box(12,3,69,5);

gotoxy(31,4);

textcolor(CYAN + BLINK);

cputs("PUNJAB NATIONAL BANK");

box(16,7,65,22);

70

Page 71: PUNJAB NATIONAL BANK VB PROJECT

textcolor(CYAN);

gotoxy(30,7);

cputs(" ++ SEARCH ACCOUNT ++ ");

gotoxy(18,9);

cputs("ENTER NAME TO SEARCH : ");

check_name(nm, MAX);

_setcursortype(_NOCURSOR);

rewind(f);

while(fread(b, sizeof(struct bank), 1, f))

{

if (strcmp(nm, b->name) == 0)

{

i++;

gotoxy(27,12);

cprintf("ACCOUNT NO : %s",b->id);

71

Page 72: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(27,14);

cprintf("PERSON NAME : %s",b->name);

gotoxy(27,16);

cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b->year);

gotoxy(27,18);

cprintf("CURR BALANCE : %.00lf",b->bal);

textcolor(YELLOW);

gotoxy(19,21); cputs(b->id);

gotoxy(26,21); cputs(b->name);

gotoxy(46,21); cprintf("%d-%d-%d",b->day,b->month,b->year);

gotoxy(59,21); cprintf("%.00lf",b->bal);

fflush(stdin);

getch();

}

}

}

else

{

clrscr();

72

Page 73: PUNJAB NATIONAL BANK VB PROJECT

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

}

fclose(f);

searchmenu();

}

void searchcase(bank *b)

{

char ch[MIN];

int r = 12, m = 0;

FILE *f;

textcolor(GREEN);

73

Page 74: PUNJAB NATIONAL BANK VB PROJECT

clrscr();

_setcursortype(_SOLIDCURSOR);

f = fopen("Bank.dat","rb");

if (f != NULL)

{

box(12,2,69,4);

gotoxy(31,3);

textcolor(CYAN + BLINK);

cputs("PUNJAB NATIONAL BANK");

box(8,8,73,24);

textcolor(CYAN);

gotoxy(27,8);

cprintf(" ++ ALL MATCHING RESULTS ++ ");

textcolor(RED);

gotoxy(10,10);

74

Page 75: PUNJAB NATIONAL BANK VB PROJECT

cprintf("ACCOUNT NO. NAME OPENING DATE BALANCE");

textcolor(CYAN);

gotoxy(22,6);

cputs("ENTER Ist LETTER OF NAME TO SEARCH : ");

check_name(ch, MIN);

rewind(f);

_setcursortype(_NOCURSOR);

while (fread(b, sizeof(struct bank), 1, f))

{

if(b->name[m] == ch[m])

{

if(r == 22)

{

textcolor(YELLOW);

gotoxy(10,23);

cprintf("PRESS ANY KEY TO CONTINUE...");

getch();

75

Page 76: PUNJAB NATIONAL BANK VB PROJECT

textcolor(GREEN);

clrscr();

box(12,2,69,4);

gotoxy(31,3);

textcolor(CYAN + BLINK);

cprintf("PUNJAB NATIONAL BANK");

box(6,8,73,24);

textcolor(CYAN);

gotoxy(25,8);

cprintf(" ++ ALL MATCHING RESULTS ++ ");

textcolor(RED);

gotoxy(10,10);

cprintf("ACCOUNT NO. NAME OPENING DATE BALANCE");

r = 12;

}

76

Page 77: PUNJAB NATIONAL BANK VB PROJECT

else

{

textcolor(CYAN);

gotoxy(12,r);

cputs(b->id);

gotoxy(26,r);

cputs(b->name);

gotoxy(50,r);

cprintf("%d-%d-%d",b->day,b->month,b->year);

gotoxy(66,r);

cprintf("%.00lf",b->bal);

r++;

}

}

}

fclose(f);

77

Page 78: PUNJAB NATIONAL BANK VB PROJECT

textcolor(YELLOW);

gotoxy(10,23);

cputs("END OF RECORDS");

getch();

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

}

searchmenu();

}

78

Page 79: PUNJAB NATIONAL BANK VB PROJECT

void delet(bank *b)

{

int i;

char del[NUM];

char ch;

FILE *f, *fd;

textcolor(GREEN);

clrscr();

_setcursortype(_SOLIDCURSOR);

f = fopen("Bank.dat","rb");

fd = fopen("Temp.dat","wb");

if (f != NULL)

{

box(12,3,69,5);

79

Page 80: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(31,4);

textcolor(CYAN + BLINK);

cputs("PUNJAB NATIONAL BANK");

box(16,7,65,22);

textcolor(CYAN);

gotoxy(30,7);

cputs(" ++ DELETE ACCOUNT ++ ");

gotoxy(24,9);

cputs("ENTER ACCOUNT NO. TO DELETE : ");

check_id(del, NUM);

_setcursortype(_NOCURSOR);

while(fread(b, sizeof(struct bank), 1, f))

{

if (strcmp(del, b->id)== 0)

{

80

Page 81: PUNJAB NATIONAL BANK VB PROJECT

i++;

gotoxy(27,12);

cprintf("ACCOUNT NO : %s",b->id);

gotoxy(27,14);

cprintf("PERSON NAME : %s",b->name);

gotoxy(27,16);

cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b->year);

gotoxy(27,18);

cprintf("CURR BALANCE : %.00lf",b->bal);

textcolor(YELLOW);

gotoxy(19,21); cputs(b->id);

gotoxy(26,21); cputs(b->name);

gotoxy(46,21); cprintf("%d-%d-%d",b->day,b->month,b->year);

gotoxy(59,21); cprintf("%.00lf",b->bal);

gotoxy(24,23);

cputs("ARE U SURE U WANT TO DELETE ? :- ");

ch = getche();

}

}

if (ch == 'Y' || ch == 'y')

81

Page 82: PUNJAB NATIONAL BANK VB PROJECT

{

gotoxy(28,24); textcolor(YELLOW);

cprintf("RECORD DELETED SUCCESSFULY");

getch();

}

else if (ch == 'N'|| ch == 'n')

menu();

rewind(f);

while(fread(b, sizeof(struct bank), 1, f) == 1)

{

if (strcmp(del, b->id) != 0)

fwrite(b, sizeof(struct bank), 1, fd);

}

fclose(f);

fclose(fd);

remove("Bank.dat");

rename("Temp.dat","Bank.dat");

menu();

82

Page 83: PUNJAB NATIONAL BANK VB PROJECT

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

}

menu();

}

void deposit(bank *b)

{

int i;

char dp[NUM];

83

Page 84: PUNJAB NATIONAL BANK VB PROJECT

FILE *f, *fm;

textcolor(GREEN);

clrscr();

_setcursortype(_SOLIDCURSOR);

f = fopen("Bank.dat","rb");

fm = fopen("Temp.dat","wb");

if (f != NULL)

{

box(12,3,69,5);

gotoxy(31,4);

textcolor(CYAN + BLINK);

cputs("PUNJAB NATIONAL BANK");

box(16,7,65,22);

textcolor(CYAN);

84

Page 85: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(30,7);

cputs(" ++ DEPOSIT MONEY ++ ");

gotoxy(24,9);

cputs("ENTER ACCOUNT NO. TO DEPOSIT : ");

check_id(dp, NUM);

rewind(f);

while(fread(b, sizeof(struct bank), 1, f))

{

if (strcmp(dp, b->id) == 0)

{

i++;

gotoxy(27,12);

cprintf("ACCOUNT NO : %s",b->id);

gotoxy(27,14);

cprintf("PERSON NAME : %s",b->name);

gotoxy(27,16);

85

Page 86: PUNJAB NATIONAL BANK VB PROJECT

cputs("DEPOSIT MONEY : ");

cin>>b->dep;

b->bal = b->bal + b->dep;

gotoxy(27,18);

cprintf("BALANCE NOW : %.00lf",b->bal);

_setcursortype(_NOCURSOR);

textcolor(YELLOW);

gotoxy(19,21); cputs(b->id);

gotoxy(26,21); cputs(b->name);

gotoxy(46,21); cprintf("%.00lf",b->dep);

gotoxy(59,21); cprintf("%.00lf",b->bal);

fflush(stdin);

getch();

}

fwrite(b, sizeof(struct bank), 1 ,fm);

}

86

Page 87: PUNJAB NATIONAL BANK VB PROJECT

fclose(f);

fclose(fm);

remove("Bank.dat");

rename("Temp.dat","Bank.dat");

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

}

menu();

}

87

Page 88: PUNJAB NATIONAL BANK VB PROJECT

void withdraw(bank *b)

{

int i;

char wt[NUM];

FILE *f, *fm;

textcolor(GREEN);

clrscr();

_setcursortype(_SOLIDCURSOR);

f = fopen("Bank.dat","rb");

fm = fopen("Temp.dat","wb");

if (f != NULL)

{

box(12,3,69,5);

gotoxy(31,4);

textcolor(CYAN + BLINK);

88

Page 89: PUNJAB NATIONAL BANK VB PROJECT

cputs("PUNJAB NATIONAL BANK");

box(16,7,65,22);

textcolor(CYAN);

gotoxy(31,7);

cputs(" ++ WITHDRAW MONEY ++ ");

gotoxy(24,9);

cputs("ENTER ACCOUNT NO. TO WITHDRAW : ");

check_id(wt, NUM);

rewind(f);

while(fread(b, sizeof(struct bank), 1, f))

{

if (strcmp(wt, b->id)== 0)

{

gotoxy(27,12);

cprintf("ACCOUNT NO : %s",b->id);

gotoxy(27,14);

89

Page 90: PUNJAB NATIONAL BANK VB PROJECT

cprintf("PERSON NAME : %s",b->name);

gotoxy(27,16);

cputs("WITHDRAW MONEY : ");

cin>>b->with;

if (b->with > b->bal)

{

menu();

}

else

{

b->bal = b->bal - b->with;

gotoxy(27,18);

cprintf("BALANCE NOW : %.00lf",b->bal);

_setcursortype(_NOCURSOR);

textcolor(YELLOW);

gotoxy(19,21); cputs(b->id);

gotoxy(26,21); cputs(b->name);

gotoxy(46,21); cprintf("%.00lf",b->with);

90

Page 91: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(59,21); cprintf("%.00lf",b->bal);

}

fflush(stdin);

getch();

}

fwrite(b, sizeof(struct bank), 1, fm);

}

fclose(f);

fclose(fm);

remove("Bank.dat");

rename("Temp.dat","Bank.dat");

}

else

{

clrscr();

box(26,12,55,14);

_setcursortype(_NOCURSOR);

91

Page 92: PUNJAB NATIONAL BANK VB PROJECT

textcolor(YELLOW + BLINK);

gotoxy(28,13);

cputs("*** ERROR OPENING FILE ***");

getch();

}

menu();

}

void splash()

{

textcolor(GREEN);

clrscr();

_setcursortype(_NOCURSOR); // To disable the cursor.

box(12,3,69,5);

gotoxy(31,4);

92

Page 93: PUNJAB NATIONAL BANK VB PROJECT

textcolor(26);

cprintf("PUNJAB NATIONAL BANK");

box(12,6,69,10);

gotoxy(25,8);

textcolor(26);

cprintf("* WELCOME TO PUNJAB NATIONAL BANK *");

gotoxy(25,7);

textcolor(26 + BLINK);

cprintf("***********************************");

gotoxy(25,9);

cprintf("***********************************");

box(12,12,69,20);

gotoxy(14,14);

textcolor(RED);

cprintf("PROGRAMMED BY : ");

gotoxy(14,17);

cprintf("COPYRIGHTS :");

textcolor(YELLOW);

93

Page 94: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(31,14);

cprintf("Pawan kumar, Mohd Aziz, Yogesh Atri");

gotoxy(31,17);

cprintf("IECS POLYTECHNIC PURKHOO CAMP DOMANA");

gotoxy(31,18);

cprintf("Jammu");

// delay(5000);

password();

}

/* ***: LOGIN WINDOW OF PROGRAM :*** */

void password()

{

char pass[10] = {"pawan"}; // Password of the Program.

char p[10]; // Variable for the Password.

char ps;

char ch;

94

Page 95: PUNJAB NATIONAL BANK VB PROJECT

int i = 0, c = 45;

textcolor(2);

clrscr();

box(12,3,69,5);

gotoxy(31,4);

textcolor(YELLOW);

cprintf("PUNJAB NATIONAL BANK");

box(16,7,65,22);

gotoxy(30,9);

textcolor(81);

cprintf("WELCOME TO BANK SERVICES");

gotoxy(25,8);

cprintf("**********************************");

95

Page 96: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(25,10);

cprintf("**********************************");

gotoxy(25,9);

cprintf("***");

gotoxy(56,9);

cprintf("***");

box(16,12,65,15);

textcolor(81);

gotoxy(38,13);

cprintf("LOGIN");

gotoxy(33,13);

cprintf("***");

gotoxy(45,13);

cprintf("***");

gotoxy(33,14);

cprintf("***************");

gotoxy(28,17);

96

Page 97: PUNJAB NATIONAL BANK VB PROJECT

textcolor(13);

cprintf("ENTER PASSWORD : ");

textcolor(RED);

_setcursortype(_SOLIDCURSOR); // To Show Solid cursor.

while(i <= 9 || ps !='\r')

{

ps = getche();

gotoxy(c,17);

cprintf("*");

if (ps == '\r')

break;

else

{

p[i] = ps;

c++;

i++;

}

if (i > 12) break;

}

97

Page 98: PUNJAB NATIONAL BANK VB PROJECT

p[i] = '\0';

_setcursortype(_NOCURSOR); // To disable the cursor.

if(strcmp(p,pass) == 0)

{

gotoxy(28,19);

textcolor(YELLOW + BLINK);

cprintf("YOU ARE SUCCESSFULY LOGIN ..... ");

delay(3000);

menu();

}

else

{

gotoxy(27,19);

cprintf("SORRY! ACCESS DENIED..... ");

gotoxy(27,21);

cprintf("LET'S TRY AGAIN [Y]/[N] : ");

ch = getche();

}

98

Page 99: PUNJAB NATIONAL BANK VB PROJECT

if (ch == 'Y'|| ch == 'y')

password();

else if (ch == 'N'|| ch == 'n')

exit(0);

}

void menu()

{

//textcolor(81);

char *ch[] = {"ADD NEW ACCOUNT","DEPOSIT MONEY","WITHDRAW MONEY",

"VIEW ACCOUNTS","DELETE ACCOUNT","SEARCH ACCOUNT",

"** HELP **","** EXIT **"};

int a;

int d = 1;

char choice;

textcolor(GREEN);

clrscr();

99

Page 100: PUNJAB NATIONAL BANK VB PROJECT

box(26,3,55,5);

textcolor(CYAN + BLINK);

gotoxy(29,4);

cprintf("PUNJAB NATIONAL BANK");

box(26,6,55,8);

gotoxy(33,7);

textcolor(CYAN);

cprintf("***** MENU *****");

box(26,9,55,20);

for(int i=0;i<8;i++)

{

gotoxy(35,11+i);

textcolor(9);

cprintf(" %s ",ch[i]);

}

_setcursortype(_NOCURSOR);

textcolor(GREEN);

100

Page 101: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(25,22);

cputs("================================");

gotoxy(25,24);

cputs("================================");

while(1)

{

kee:

for(a = 1; a <= 8; ++a)

{

if(a == d)

{

if (d == 1)

{

textcolor(RED); gotoxy(37,11);cprintf("ADD NEW ACCOUNT");

textcolor(CYAN);gotoxy(30,11); cputs("¯¯>");

gotoxy(27,23); cputs("PRESS ENTER TO ADD NEW RECORD");

}

else if (d == 2)

{

101

Page 102: PUNJAB NATIONAL BANK VB PROJECT

textcolor(RED); gotoxy(37,12);cprintf("DEPOSIT MONEY");

gotoxy(30,12); textcolor(CYAN); cputs("¯¯>");

gotoxy(27,23); cputs("PRESS ENTER TO DEPOSIT MONEY");

}

else if (d == 3)

{

textcolor(RED); gotoxy(37,13);cprintf("WITHDRAW MONEY");

gotoxy(30,13); textcolor(CYAN); cputs("¯¯>");

gotoxy(27,23); cputs("PRESS ENTER TO WITHDRAW MONEY");

}

else if (d == 4)

{

textcolor(RED); gotoxy(37,14);cprintf("VIEW ACCOUNTS");

gotoxy(30,14); textcolor(CYAN); cputs("¯¯>");

gotoxy(27,23); cputs("PRESS ENTER TO VIEW RECORDS");

}

else if (d == 5)

{

textcolor(RED); gotoxy(37,15);cprintf("DELETE ACCOUNT");

gotoxy(30,15); textcolor(CYAN); cputs("¯¯>");

102

Page 103: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(27,23); cputs("PRESS ENTER TO DELETE RECORD");

}

else if (d == 6)

{

textcolor(RED); gotoxy(37,16);cprintf("SEARCH ACCOUNT");

gotoxy(30,16); textcolor(CYAN); cputs("¯¯>");

gotoxy(27,23); cputs("PRESS ENTER TO SEARCH RECORD");

}

else if (d == 7)

{

textcolor(RED); gotoxy(37,17);cprintf("** HELP **");

gotoxy(30,17); textcolor(CYAN); cputs("¯¯>");

gotoxy(28,23); cputs("PRESS ENTER TO VIEW HELP");

}

else if (d == 8)

{

textcolor(RED); gotoxy(37,18);cprintf("** EXIT **");

gotoxy(30,18); textcolor(CYAN); cputs("¯¯>");

gotoxy(27,23); cputs("PRESS ENTER TO EXIT PROGRAM");

}

103

Page 104: PUNJAB NATIONAL BANK VB PROJECT

}

else

{

if (a == 1)

{

textcolor(9); gotoxy(37,11);cprintf("ADD NEW ACCOUNT");

textcolor(CYAN);gotoxy(30,11); cputs(" ");

gotoxy(27,23); clreol();

}

else if (a == 2)

{

textcolor(9); gotoxy(37,12);cprintf("DEPOSIT MONEY");

gotoxy(30,12); cputs(" ");

}

else if (a == 3)

{

textcolor(9); gotoxy(37,13);cprintf("WITHDRAW MONEY");

gotoxy(30,13); cputs(" ");

}

104

Page 105: PUNJAB NATIONAL BANK VB PROJECT

else if (a == 4)

{

textcolor(9); gotoxy(37,14);cprintf("VIEW ACCOUNTS");

gotoxy(30,14); cputs(" ");

}

else if (a == 5)

{

textcolor(9); gotoxy(37,15);cprintf("DELETE ACCOUNT");

gotoxy(30,15); cputs(" ");

}

else if (a == 6)

{

textcolor(9); gotoxy(37,16);cprintf("SEARCH ACCOUNT");

gotoxy(30,16); cputs(" ");

}

else if (a == 7)

{

textcolor(9); gotoxy(37,17);cprintf("** HELP **");

gotoxy(30,17); cputs(" ");

105

Page 106: PUNJAB NATIONAL BANK VB PROJECT

}

else if (a == 8)

{

textcolor(9); gotoxy(37,18);cprintf("** EXIT **");

gotoxy(30,18); cputs(" ");

}

}

}

choice = getch();

if (choice == 13)

{

if (d == 1) add(&b);

if (d == 2) deposit(&b);

if (d == 3) withdraw(&b);

if (d == 4) viewmenu();

if (d == 5) delet(&b);

106

Page 107: PUNJAB NATIONAL BANK VB PROJECT

if (d == 6) searchmenu();

if (d == 7) helpmenu();

if (d == 8) quit();

}

if (choice == 0)

{

choice = getch();

if (choice == 80)

{

d++;

if (d > 8) d = 1;

goto kee;

}

if (choice == 72)

{

d--;

if (d < 1) d = 8;

107

Page 108: PUNJAB NATIONAL BANK VB PROJECT

goto kee;

}

}

}

}

void viewmenu()

{

char *ch[] = {"ONE BY ONE","VIEW ALL","<< BACK >>"};

int a;

int d = 1;

char choice;

textcolor(GREEN);

clrscr();

box(26,3,55,5);

textcolor(CYAN + BLINK);

gotoxy(28,4);

cprintf("PUNJAB NATIONAL BANK");

108

Page 109: PUNJAB NATIONAL BANK VB PROJECT

box(31,8,50,10);

gotoxy(33,9);

textcolor(CYAN);

cprintf("** VIEW MENU **");

box(26,12,55,19);

for(int i = 0;i < 2; i++)

{

gotoxy(35,14+i);

textcolor(9);

cprintf(" %s ",ch[i]);

}

_setcursortype(_NOCURSOR);

textcolor(GREEN);

gotoxy(25,22);

cputs("================================");

gotoxy(25,24);

cputs("================================");

109

Page 110: PUNJAB NATIONAL BANK VB PROJECT

while(1)

{

kee:

for(a = 1; a <= 3; ++a)

{

if(a == d)

{

if (d == 1)

{

gotoxy(37,14); textcolor(RED);cprintf("ONE BY ONE");

gotoxy(30,14); textcolor(CYAN); cputs("¯¯>");

gotoxy(26,23); cputs("PRESS ENTER TO VIEW ONE BY ONE");

}

else if (d == 2)

{

gotoxy(37,15); textcolor(RED);cprintf("VIEW ALL");

gotoxy(30,15); textcolor(CYAN); cputs("¯¯>");

gotoxy(26,23); cputs("PRESS ENTER TO VIEW ALL RECORD");

110

Page 111: PUNJAB NATIONAL BANK VB PROJECT

}

/*

else if (d == 3)

{

gotoxy(37,16); textcolor(RED);cprintf("PRINT REC.");

gotoxy(30,16); textcolor(CYAN); cputs("¯¯>");

gotoxy(26,23); cputs("PRESS ENTER TO GO BACK TO MAIN");

}

*/

else if (d == 3)

{

gotoxy(37,16); textcolor(RED);cprintf("<< BACK >>");

gotoxy(30,16); textcolor(CYAN); cputs("¯¯>");

gotoxy(26,23); cputs("PRESS ENTER TO GO BACK TO MAIN");

}

}

else

{

if (a == 1)

{

gotoxy(37,14); textcolor(9);cprintf("ONE BY ONE");

111

Page 112: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(30,14); cputs(" ");

gotoxy(27,23); clreol();

}

else if (a == 2)

{

gotoxy(37,15); textcolor(9);cprintf("VIEW ALL");

gotoxy(30,15); cputs(" ");

}

/*

else if (a == 3)

{

gotoxy(37,16); textcolor(9);cprintf("PRINT REC.");

gotoxy(30,16); cputs(" ");

}

*/

else if (a == 3)

{

gotoxy(37,16); textcolor(9);cprintf("<< BACK >>");

gotoxy(30,16); cputs(" ");

}

}

112

Page 113: PUNJAB NATIONAL BANK VB PROJECT

}

choice = getch();

if (choice == 13)

{

if (d == 1) view(&b);

if (d == 2) viewall(&b);

// if (d == 3) print();

if (d == 3) menu();

}

if (choice == 0)

{

choice = getch();

if (choice == 80)

{

d++;

113

Page 114: PUNJAB NATIONAL BANK VB PROJECT

if (d > 3) d = 1;

goto kee;

}

if (choice == 72)

{

d--;

if (d < 1) d = 3;

goto kee;

}

}

}

}

void searchmenu()

{

char *ch[] = {"SEARCH ACCOUNT","SEARCH NAME","SEARCH CASE",

"<<< BACK >>>"};

int a;

int d = 1;

char choice;

114

Page 115: PUNJAB NATIONAL BANK VB PROJECT

textcolor(GREEN);

clrscr();

box(26,3,55,5);

textcolor(CYAN + BLINK);

gotoxy(28,4);

cprintf("PUNJAB NATIONAL BANK");

box(31,8,50,10);

gotoxy(33,9);

textcolor(CYAN);

cprintf("* SEARCH MENU *");

box(26,12,55,19);

for(int i = 0;i < 4; i++)

{

gotoxy(35,14+i);

textcolor(9);

cprintf(" %s ",ch[i]);

}

115

Page 116: PUNJAB NATIONAL BANK VB PROJECT

_setcursortype(_NOCURSOR);

textcolor(GREEN);

gotoxy(25,22);

cputs("================================");

gotoxy(25,24);

cputs("================================");

while(1)

{

kee:

for(a = 1; a <= 4; ++a)

{

if(a == d)

{

if (d == 1)

{

gotoxy(37,14); textcolor(RED);cprintf("SEARCH ACCOUNT");

116

Page 117: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(30,14); textcolor(CYAN); cputs("¯¯>");

gotoxy(25,23); cputs("PRESS ENTER TO SEARCH BY

ACCOUNT");

}

else if (d == 2)

{

gotoxy(37,15); textcolor(RED);cprintf("SEARCH NAME");

gotoxy(30,15); textcolor(CYAN); cputs("¯¯>");

gotoxy(26,23); cputs("PRESS ENTER TO SEARCH BY NAME");

}

else if (d == 3)

{

gotoxy(37,16); textcolor(RED);cprintf("SEARCH CASE");

gotoxy(30,16); textcolor(CYAN); cputs("¯¯>");

gotoxy(26,23); cputs("PRESS ENTER TO SEARCH BY CASE");

}

else if (d == 4)

{

gotoxy(37,17); textcolor(RED);cprintf("<<< BACK >>>");

gotoxy(30,17); textcolor(CYAN); cputs("¯¯>");

117

Page 118: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(26,23); cputs("PRESS ENTER TO GO BACK TO MAIN");

}

}

else

{

if (a == 1)

{

gotoxy(37,14); textcolor(9);cprintf("SEARCH ACCOUNT");

gotoxy(30,14); cputs(" ");

gotoxy(27,23); clreol();

}

else if (a == 2)

{

gotoxy(37,15); textcolor(9);cprintf("SEARCH NAME");

gotoxy(30,15); cputs(" ");

}

else if (a == 3)

{

gotoxy(37,16); textcolor(9);cprintf("SEARCH CASE");

118

Page 119: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(30,16); cputs(" ");

}

else if (a == 4)

{

gotoxy(37,17); textcolor(9);cprintf("<<< BACK >>>");

gotoxy(30,17); cputs(" ");

}

}

}

choice = getch();

if (choice == 13)

{

if (d == 1) searchid(&b);

if (d == 2) searchname(&b);

if (d == 3) searchcase(&b);

119

Page 120: PUNJAB NATIONAL BANK VB PROJECT

if (d == 4) menu();

}

if (choice == 0)

{

choice = getch();

if (choice == 80)

{

d++;

if (d > 4) d = 1;

goto kee;

}

if (choice == 72)

{

d--;

if (d < 1) d = 4;

goto kee;

}

}

}

120

Page 121: PUNJAB NATIONAL BANK VB PROJECT

}

void helpmenu()

{

char *ch[] = {"*INTRODUCTION*","*HOW TO USE ?*","**ABOUT BANK**",

"<<< BACK >>>"};

int a;

int d = 1;

char choice;

textcolor(GREEN);

clrscr();

box(26,3,55,5);

textcolor(CYAN + BLINK);

gotoxy(28,4);

cprintf("PUNJAB NATIONAL BANK");

box(8,6,28,8);

gotoxy(12,7);

textcolor(CYAN);

121

Page 122: PUNJAB NATIONAL BANK VB PROJECT

cprintf("* HELP MENU *");

box(6,10,30,17);

for(int i = 0;i < 4; i++)

{

gotoxy(11,12+i);

textcolor(9);

cprintf(" %s ",ch[i]);

}

_setcursortype(_NOCURSOR);

textcolor(GREEN);

gotoxy(5,22);

cputs("===========================");

gotoxy(5,24);

cputs("===========================");

while(1)

{

122

Page 123: PUNJAB NATIONAL BANK VB PROJECT

kee:

for(a = 1; a <= 4; ++a)

{

if(a == d)

{

textcolor(CYAN);

if (d == 1)

{

gotoxy(13,12); textcolor(RED);cprintf("*INTRODUCTION*");

gotoxy(8,12); textcolor(CYAN); cputs("¯>");

gotoxy(5,23); cputs("PRESS ENTER FOR INTRODUCTION");

}

else if (d == 2)

{

gotoxy(13,13); textcolor(RED);cprintf("*HOW TO USE ?*");

gotoxy(8,13); textcolor(CYAN); cputs("¯>");

gotoxy(5,23); cputs("PRESS ENTER TO LEARN USAGE");

}

else if (d == 3)

123

Page 124: PUNJAB NATIONAL BANK VB PROJECT

{

gotoxy(13,14); textcolor(RED);cprintf("**ABOUT BANK**");

gotoxy(8,14); textcolor(CYAN); cputs("¯>");

gotoxy(7,23); cputs("PRESS ENTER FOR CONTACT");

}

else if (d == 4)

{

gotoxy(13,15); textcolor(RED);cprintf("<<< BACK >>>");

gotoxy(8,15); textcolor(CYAN); cputs("¯>");

gotoxy(7,23); cputs("PRESS ENTER TO GO BACK");

}

}

else

{

if (a == 1)

{

gotoxy(13,12); textcolor(9);cprintf("*INTRODUCTION*");

gotoxy(8,12); cputs(" ");

gotoxy(5,23); clreol();

}

124

Page 125: PUNJAB NATIONAL BANK VB PROJECT

else if (a == 2)

{

gotoxy(13,13); textcolor(9);cprintf("*HOW TO USE ?*");

gotoxy(8,13); cputs(" ");

}

else if (a == 3)

{

gotoxy(13,14); textcolor(9);cprintf("**ABOUT BANK**");

gotoxy(8,14); cputs(" ");

}

else if (a == 4)

{

gotoxy(13,15); textcolor(9);cprintf("<<< BACK >>>");

gotoxy(8,15); cputs(" ");

}

}

}

125

Page 126: PUNJAB NATIONAL BANK VB PROJECT

choice = getch();

if (choice == 13)

{

if (d == 1) intro();

if (d == 2) usage();

if (d == 3) about();

if (d == 4) menu();

}

if (choice == 0)

{

choice = getch();

if (choice == 80)

{

d++;

if (d > 4) d = 1;

goto kee;

}

126

Page 127: PUNJAB NATIONAL BANK VB PROJECT

if (choice == 72)

{

d--;

if (d < 1) d = 4;

goto kee;

}

}

}

}

void intro()

{

textcolor(GREEN);

box(35,6,78,24);

_setcursortype(_NOCURSOR);

textcolor(RED);

127

Page 128: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(38,8);

cputs("PUNJAB NATIONAL BANK is a SOFTWARE that");

gotoxy(38,9);

cputs("can used for Simple Bank Management");

gotoxy(38,10);

cputs("Purpose.It has a Beautiful GUI for Easy");

gotoxy(38,11);

cputs("Understanding for the Users.");

gotoxy(38,13);

cputs("Just Press Enter on The Option You");

gotoxy(38,14);

cputs("Want to View");

gotoxy(38,17);

cputs("PLZ! Give Me Your Comments About");

gotoxy(38,18);

cputs("The Software [ PUNJAB NATIONAL BANK ].");

textcolor(YELLOW);

gotoxy(39,21);

cputs("For Contact PLZ Read ABOUT Option");

128

Page 129: PUNJAB NATIONAL BANK VB PROJECT

getch();

helpmenu();

}

void usage()

{

textcolor(GREEN);

box(35,6,75,22);

_setcursortype(_NOCURSOR);

textcolor(RED);

gotoxy(38,8);

cputs("Simply By using Arrows Keys Move in");

gotoxy(38,9);

cputs("The Program as You Want. I Also Try");

gotoxy(38,10);

129

Page 130: PUNJAB NATIONAL BANK VB PROJECT

cputs("To Guide You Through The Instruction");

gotoxy(38,11);

cputs("Which Appaears Bottom of The Screen.");

gotoxy(38,12);

cputs("Just Follow The Instruction to Work.");

gotoxy(39,18);

cputs("If Still Then You Face Any Problem");

textcolor(YELLOW);

gotoxy(39,21);

cputs("Plz! Mail: [email protected]");

getch();

helpmenu();

}

void about()

{

130

Page 131: PUNJAB NATIONAL BANK VB PROJECT

textcolor(GREEN);

box(35,6,78,22);

_setcursortype(_NOCURSOR);

textcolor(CYAN);

gotoxy(48,8);

cputs("*** MADE BY ***");

gotoxy(48,12);

cputs("*** CONTACT ***");

gotoxy(47,16);

cputs("*** COPYRIGHT ***");

textcolor(RED);

gotoxy(40,10);

cputs("Pawan kumar,Mohd Aziz, Yogesh Atri");

131

Page 132: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(40,14);

cputs("e-mail:[email protected]");

gotoxy(40,18);

cputs("IECS POLYTECHNIC PURKHOO CAMP ");

gotoxy(40,19);

cputs("DOMANA JAMMU.");

textcolor(YELLOW);

gotoxy(37,21);

cputs("PLZ! MAIL AS SUBJECT PUNJAB NATIONAL BANK");

getch();

helpmenu();

}

void quit()

{

char ch;

132

Page 133: PUNJAB NATIONAL BANK VB PROJECT

textcolor(GREEN);

clrscr();

_setcursortype(_NOCURSOR);

box(26,5,55,7);

textcolor(CYAN + BLINK);

gotoxy(29,6);

cputs("PUNJAB NATIONAL BANK");

box(15,12,66,16);

textcolor(CYAN);

gotoxy(18,14);

cputs("ARE YOU SURE YOU WANT TO EXIT ? [Y] / [N] : ");

ch = getche();

133

Page 134: PUNJAB NATIONAL BANK VB PROJECT

if (ch == 'Y' || ch == 'y')

{

gotoxy(24,18);

textcolor(14);

cputs("THANK YOU FOR USING THIS SOFTWARE");

delay(1000);

exit(0);

}

else if (ch == 'N'|| ch == 'n')

menu();

else

quit();

}

void print(bank *b)

{

FILE *f;

clrscr();

134

Page 135: PUNJAB NATIONAL BANK VB PROJECT

putc('\n',stdprn);

fputs("\n\t\t\tREPRT OF SALES",stdprn);

putc('\n',stdprn);

fputs("===========================",stdprn);

putc('\n',stdprn);

putc('\n',stdprn);

gotoxy(10,9);

fprintf(stdprn,"ACCOUNT NO. NAME OPENING DATE BALANCE");

putc('\n',stdprn);

putc('\n',stdprn);

f = fopen("Bank.dat","rb");

while( (fread(b, sizeof(struct bank), 1, stdprn)) == 1)

{

fprintf(stdprn,"%d",b->id);

fprintf(stdprn,"%s",b->name);

fprintf(stdprn,"%d-%d-%d",b->day,b->month,b->year);

fprintf(stdprn,"%.00lf\n",b->bal);

}

135

Page 136: PUNJAB NATIONAL BANK VB PROJECT

fclose(f);

}

// coding for user defined header files

// to draw box

void box(int a, int b, int c, int d)

{

for(int i = a; i < c; i++)

{

gotoxy(i,b); printf("\xcd");

gotoxy(i,d); printf("\xcd");

}

for(int j = b; j < d; j++)

{

gotoxy(a,j); printf("\xba");

gotoxy(c,j); printf("\xba");

}

136

Page 137: PUNJAB NATIONAL BANK VB PROJECT

gotoxy(a,b); printf("\xc9");

gotoxy(c,b); printf("\xbb");

gotoxy(a,d); printf("\xc8");

gotoxy(c,d); printf("\xbc");

}

// for login window

#include<stdio.h>

void check_id(char *p, int size)

{

int i=0;

char ch;

do

{

ch=getch();

if( (ch>='0' && ch<='9') && (i<size-1) )

{

*p=ch;

p++;

137

Page 138: PUNJAB NATIONAL BANK VB PROJECT

i++;

printf("%c",ch);

}

else

if(ch==8 && i>0)

{

printf("%c%c%c",8,32,8);

i--;

p--;

}

}while(ch!=13 || i<size-1);

*p='\0';

}

void check_name(char *p, int size)

{

int j=0;

char x[40],cj;

do

138

Page 139: PUNJAB NATIONAL BANK VB PROJECT

{

cj=toupper(getch());

if(((cj>='a' && cj<='z')||(cj>='A' && cj<='Z')||(cj==' ')) && (j<size-1))

{

*p++=cj;

j++;

printf("%c",cj);

}

else

if(cj==8 && j>0)

{

printf("%c%c%c",8,32,8);

j--; p--;

}

}while(cj!=13);

x[j]='\0';

*p='\0';

}

139

Page 140: PUNJAB NATIONAL BANK VB PROJECT

OUTPUT DESIGN

1. WELCOME WINDOW

MAIN MENU

140

Page 141: PUNJAB NATIONAL BANK VB PROJECT

3. OPEN NEW ACCOUNT

4. DEPOSIT MONEY

141

Page 142: PUNJAB NATIONAL BANK VB PROJECT

5. WITHDRAW MONEY

6. VIEW ACCOUNTS

142

Page 143: PUNJAB NATIONAL BANK VB PROJECT

7. VIEW ACCOUNT BY VIEW ALL

8. DELETE ACCOUNT

143

Page 144: PUNJAB NATIONAL BANK VB PROJECT

9. SEARCH ACCOUNT

10. HELP

144

Page 145: PUNJAB NATIONAL BANK VB PROJECT

11. HELP(ABOUT BANK)

145

Page 146: PUNJAB NATIONAL BANK VB PROJECT

The software system developed by us will completely automate the working

Operations of bank. It will reduce the need of keeping manual records. All the

operations have been completely integrated in this system. It will act as a single

window filing area for all types banking operation in bank, whether they may be

marketing people or accounting people, etc. As no software is complete software,

so some drawbacks may be there in the future applications.

We have developed this system from a student’s point of view. We may

not been able to incorporate all accounting aspects in this system. This system

has been developed for a single branch only..

The Bank in our country is on the threshold of a new era of rapid

expansion. A more competitive environment is emerging with new participants

entering the bank. We need specialists who can work in Bank. Risk management

has a wide application. It is relevant not only to insurance industry but also to

many other organizations in the fields of business and finance. To understand

risk, it measure it and weigh its consequences are an integral part of management.

Financial institutions in the management of the funds placed with them have to

reckon with market risk, credit risk, counter party risk and liquidity risk. To

mitigate the impact of various risks is the essence of risk management.

146

Page 147: PUNJAB NATIONAL BANK VB PROJECT

BOOKSOBJECT ORIENTED PROGRAMMING USING C++.

AUTHORS1. K.R VENU GOPAL AND RAJ KUMAR2. E.BAL GURU SWAMI3. ROBERT LAFORD AND GALGOTIA4. HEMANT KAPILA5. SATISH JAIN AND VINEETA PILLIAI

147