Академический Документы
Профессиональный Документы
Культура Документы
Presents...
Project
Report
by
Shrikant Singh ()
Under Guidance
of
Mr Rahul Bhatia
Submitted to the School of Computer and Information Sciences
Bachelors
of
Computer Applications
Acknowledgement
I have named it RRobosys INSURANCE SMART AGENT in the honour of my late father Sh.
Rajendra Singh. My mother has been greatest source of inspiration for me; she has motivated
me at every step of my life. I want to express my gratitude toward my guide, Mr. Rahul Bhatia
and my Study Centre Faculties Mr. Manoj & Mr. Saurabh Vasisth for their valuable guidance
in selection and case study of the present problem. I want to thank Mr. Mayank Agarwal,
System Analyst, Infosys for his technical assistance in this project.
I am thankful to my colleagues, who helped me in one or other way. Some of them are S.K.
Siddhu, Shalini Kashyap and Deepak Bhatt, LIC Agent, Meerut. I want to thank each and every
friend who helped me and please pardon me for not mentioning all those worthy names.
Thanking You,
Shrikant Singh
BCA-
Table of Contents
Acknowledgement ......................................................................................................................................... 3
APPROVED PROJECT PROPOSAL PROFORMA ................................................................................................. 6
PROJECT SYNOPSIS ............................................................................................................................................ 7
1. Introduction......................................................................................................................................... 40
2. Objectives ............................................................................................................................................ 41
3. Tools/Environment Used ..................................................................................................................... 42
4. Analysis Document .............................................................................................................................. 43
4.1 Project Scheduling ..................................................................................................................... 43
4.2 System Requirement Specification ............................................................................................ 44
4.3 Software Engineering Paradigm .............................................................................................. 49
4.4 Data Flow Diagrams .................................................................................................................. 50
4.5 ER Diagram ................................................................................................................................ 61
4.6 Data Dictionary.......................................................................................................................... 62
5. Design Document ................................................................................................................................ 67
5.1 Modules and their description ................................................................................................... 67
5.2 Data Structures .......................................................................................................................... 68
5.3 Process Logic Modules ............................................................................................................... 75
5.4 Testing Process........................................................................................................................... 78
5.5 List of Reports ............................................................................................................................ 78
6. Program Code ..................................................................................................................................... 80
7. Testing ............................................................................................................................................... 197
7.1 Test Strategies and Techniques ............................................................................................. 197
7.2 Test Plan Used ......................................................................................................................... 197
PROJECT
SYNOPSIS
Insurance
Smart Agent
RROBOSYS Insurance Smart Agent (ISA) is customized software designed to meet the
requirement of the Insurance Agencies and Agents. The existing system of policy management
followed by several agencies or agents is quite cumbersome. They use flat file system such as
spreadsheet programs or manual paper work to store their information. The existing system is
not appropriate for quick retrieval of data and reliable for consistency for updating data as per
the demand of the policy holders. It too carries the risk of data redundancy.
Insurance Smart Agent focuses on the bottleneck of the existing system. It has a simple and easy
user friendly interface designed for people with minimum computer knowledge. It primary acts
as a good information center where agents can store the information related to the policy
holders, premium payment, detail of the policies. New policies launched by Insurance Companies
can be added and older can be modified. It will provide the rating of the policies of Insurance
Companies to help the customer to decide the best for them. Premium will be increased, if policy
holder is interested in more benefits like accidental riders, etc. It will generate the due premium
in a particular period. Agents can give attractive schemes for policy holders whose policy is
lapsed with the help of lapsed policy report. It will generate the premium payment receipt on
deposit of premium to the agent/agency.
Further, agency can monitor the productivity of each agent at regular interval to give incentives
for more efficient and productive agents. It will automate the calculation of commission of the
agents. A policy holder can surrender his policy. In case of death of policy holder, the policy will
terminate and sum assured will be given to the nominee or the legal heir.
Project Objective
There are several main objectives for this project:
• To replace the manual system followed by the agents and be more eco-friendly by reducing
paper wastage.
• To provide up-to-date information about policies of the policy holder.
• To provide up-to-date information of the policy holder.
Project Category
ISA- INSURANCE SMART AGENT is a RDBMS for managing the work of an Insurance Agencies /
Agents, which is to be developed using Net Beans, an IDE based on Java and MySQL as Backend.
INSURANCE SMART AGENT emphasis on storing information, quick retrieval and updating
information. User Interface has been designed with the help of Net Beans, which is very user
friendly and supports RAD. Java is selected as the language for development due to its object
oriented and open source nature, which makes it the most popular language in present
development scenario. Like Net Beans, MySQL also attracts lots of developer because of its
simple, friendly and open source nature. Both MySQL and Net Beans can be downloaded free of
cost from their respective websites.
Administrator
Agent Premium
Management Response Response Management
ISA
Policy Management Customer Details
Response Response
Policy Customer
Management Management
1.4 1.3
Payment Manages Manages Plans
Payment Plans
Admin
Response Response
Insurer Agents
Information Information
1.1 1.2
Manages Manages
Insurer Agents
Response Response
details details
Gives Username
Insurer Details
& password
Insurers Agents
Customer
Management
Response Response
Customer Head
Information
2.1 Heads Details
Customers
Manages
Head
customer
Response
Head details
Response
2.2
Manages
Proposed details
proposed Customers
details
Policy Management
Proposal detail
Response
3.1 Response
Manages
Input details
Policy
Policy_prop
Proposal
Proposal detail
Response
3.2
Input details
Manages Policy
customers
Response
related details
policy
Premium Management
Policy detail
Response
4.1
Response
Manages
Premium Premium details
Premiums
4.2 Response
Manages
Certificates / Period details Certificates
Statement
Agent Management
Agent detail
Response
5.1
Response
checksCom
mission Period details
Commissions
5.2
Response
checkDeduction
5.3
Response
Check
payment Period details
Payment
Plans
Insurers
1.1
Adds Insurer 1.4
login
1.6
Edit Plans Check
insurers details
credentials credentials
details
agents details
1.2
Registers Admin Admin
agents
Make changes updates
1.6 1.5
Change plans details Edit Profile
User & password
password
with details
1.3
Add Plans
agents
1.7 Plans
Compute
payment
commision
payment
1.7.2
1.7.3 Compute
deduction commission
Compute
deduction
Customer_head
2.1 2.3
Add Edit
customer customer
heads heads
response
response
2.5
Set Death
Customer Mgr. Status
response
Response
Customer_head
2.4
Edit customer
2.2
Add customer
Customer detail
2.5.1
Customer detail
Close
policy
Customers
2.5.2 Policy
Death Add Death
3.1.3 3.1.4
Agents Get code
Plan select plan
P_id Term & premium
3.1.2
compare plan Customers
Policy_prop
Policy C_id update
3.1 3.6
Add proposal Cancel
3.7 proposal
View status
response
Policy_prop
policy details
Policy Mgr. Select
3.5
proposal 3.2.1
Revivepolicy Select policy response copy proposal
3.2
plans details Add policy
Policy_no
3.4 Policy detail
Surrender 3.3
Policy updates
Alter Policy Policy
Policy
Policy_no
3.4.1
3.5.1 calculate total
calculate due premium
premium updates
Premium
Premium
4.1.2 premium
Calculate Policy Deduction
late fee
4.1.1 4.4.1
Collect Due Collect Advance
premium premium
4.3.2
Add deduction
4.2
premium details Premium
Pay
premium Premium Mgr.
4.6.1
4.2.2 Create certificate
Calculate
commission Policy
LP
D
4.5.2
Check last premium premium
Commision
4.6.2
Premium gen certificate
Certificate
Agents
changes
5.4
Edit Profile 5.2
Calculate
deduction
Check
period details credentials
period details
5.1
Calculate
Agent Mgr. Deduction
commission
period details
5.5
changes No of policy
5.3
Commission Check payment
Policy_pro
Commission
Pay_id
Ag_id
5.2 ER Diagram
Payment
Legend
pays
Primary Key comm of
month
Foreign key
user Ag_id
password name
Branch Password
In_id name In_id
name
of
Insurer Offers
adds
Plan
contains
results
Table_no of
name
Policy_No Cus_id
Prop_id name
Policy of Customer
Cus_id H_id
Prem DOB
Cer_id marks
Cus_id of
C_date
Prem Premium Premiu Death
m
status status
create SA
com
com
Dd_id Com_id
Pr_id Ag_id
compute
Deduction compute Pr_id
Commission
status of
Ag_id
RROBOSYS Insurance Smart Agent Page 23
CS-76 Report
(i) Administrator Module: This module will be responsible for administration of the system.
Insurance Companies will be registered by the admin. Insurance plan and scheme will be added
using this module and provide facility to modify them later. It will create new agent and give
username and password to the agents to access the ISA and use the services of ISA. In case of
password forgotten, admin can change the agent’s password. Admin can also supervise the
work of the agents. Using this module, monthly commission and deduction will be calculated
and generate their monthly payment.
(ii) Customer/Policy Holder Management Module: This module will be responsible for
maintaining the customers or policy holders. Agents after logging in to the system can add new
Customer Head, i.e. the head of a family or the bread earner. Some Insurance schemes are for
securing future of the child; they are children but the life assured is provided to customer head.
After adding the Customer Head, detail of the customer / proposed person for insurance will be
added. It also provides the feature modification of any these detail at later stage. This module
will also mark the death of Life assured person in his death status. Guaranteed sum Assured will
be given to his after confirmation from the insurer.
(iii)Policy Management Module: This module will be responsible for managing and supervising
the policies. It will help agents to present the existing plans before the customers and give
comparative benefits of similar type of scheme. It will update the policy proposal status. In case
of bouncing of cheque, amount will be deduction for Agent’s payment. It will store the
information related to policy in case of approval of Policy proposal from both sides i.e. Insurer
and Insured. It will be used to surrender any policy and calculated the amount payable to policy
holder. This module is also used to revive any lapsed policy.
(iv) Premium Management Module: This module will handle the premium deposited by policy
holder. It will show the due premium of any policy holder and during any period. It will store the
detail of all premium deposited. It also gives the feature of advance premium deposit. It will
generate the outstanding premium, which are yet to be deposited to the Insurer. It will automate
the calculation of commission. It will be used to print premium certificate and statement. It also
generates list of cheques bounced.
(v) Agent Management Module: This module will be responsible for processing activities related
to agents. It can be used to process any kind query related to commission and deduction of the
agents. Further, it can be used to print the monthly payment of the agents. Agents can edit their
contact information.
(ii) Insurer: Stores the details of the different insurance companies enrolled.
Field Name Field Type Constraints Description
in_id varchar(10) Primary key Stores the unique insurer id.
name varchar(100) Stores the name of the insurer
type varchar(20) Stores the type of the insurance
city varchar(15) Stores the city of the insurer
phone varchar(10) Stores the phone numbers of the insurer
Iv) Agent: Stores the details of the agents of the insurance company.
Field Name Field Type Constraints Description
ag_id varchar(10) Primary key Stores the unique agent code
in_id varchar(10) Foreign key Uses the insurer id for the agent.
Branch_id Varchar(10) Not null Stores the branch agent code
Fullname varchar(50) Stores fullname of the agent
Address varchar(100) Stores address of the agent
City varchar(50) Stores city of the agent
(vii) Policy_Prop: Stores the information about policy proposal to the insurer.
Field Name Field Type Constraints Description
prop_id varchar(10) Primary key Stores the unique proposal id
in_id varchar(10) Foreign key Stores the insurer id
ag_id varchar(10) Foreign key Stores the agent id
pl_id varchar(10) Foreign key Stores the plan id
Cus_id varchar(10) Foreign key Stores the customer id
prop_date date Not null Stores the date of the proposal.
end_date date Stores the approval of the proposal.
SA Int Not null Stores the sum assured of the proposal.
Term Int Not null Stores the term of the proposal.
Mode varchar(15) Not null Stores the mode of payment of the proposal.
Add_ben blob Stores the additional riders of the proposal.
status varchar(10) Not null Stores the status of the proposal
(viii) Policy: Stores information about different enrolled policy to the customers.
Field Name Field Type Constraints Description
Policy_No Varchar(10) Primary key Stores the policy no. of policy
Prop_id Varchar(10) Foreign key Stores the proposal id
Prem int Not null Stores the premium of the policy
Term int Not null Stores the term of the policy
Cus_id Varchar(10) Stores the customer id of nominee.
Com_date Date Not null Stores the commencement date
Create agents
Here agent’s details will be filled by the administrator which is going to be registered in ISA.
Username and Password will be given to the insurer so that the insurer can use the services of
ISA. Along with creating an insurer administrator can supervise their work and number of
policies achieved in any period.
Change Password
Through this menu administrator can change the password of the agent, in case of agent has
forgotten its password.
Computation of monthly payment of agents. Agents monthly wages will generated based on
their premium received.
View Reports
• Number of active Agents
• Monthly payment of agents.
• Monthly collection of premium.
With view reports administrator can view the reports against the agent’s resource usages and
status of the agent, number of agents, number of plans the insurer having, etc.
• Add Customer Head: Before selling any plan, agent will enter the detail of head of the Life
Assured person.
• Add customer: After creating customer head, agent will enter the detail of proposed person.
• Edit Customer: Change their personal detail later
• Set Death Status: Mark any customer as dead and proceed for payment of Insurance Amount.
4. Generate Reports: Several important such as List of due premium, List of premium collected
by the agent, List of Cheque bounced premium etc. will be generated.
Validation Checks
Validation Checks has been implemented with the help of Java and MySQL with the help of
database constraints.
8. Premium Certificate
9. Premium Receipt.
10. List of collected premium during a period.
1. I could not automate the calculation of premium of a policy. As LCI, one of the
major insurer have given premium in the form tabular information based on age,
term and sum assured. There was no such formula to calculate premium. Premium
have to be entered manually after calculation from tabular data.
2. There could be some inconsistency based on premium deposition, if customer pays
premium himself at some other counter or does not give any information to the
agent. To resolve it, we should get to Insurer data of premium deposit.
Bibliography
Some important sources for the development of Insurance System proposal are as follows:
GUIDE’S BIODATA
CERTIFICATE OF ORIGINALITY
PROJECT
REPORT
1. Introduction
Insurance Smart Agent (ISA) is customized software designed to meet the requirement of the
Insurance Agencies and Agents. The existing system of policy management followed by several
agencies or agents is quite cumbersome. They use flat file system such as spreadsheet programs
or manual paper work to store their information. The existing system is not appropriate for quick
retrieval of data and reliable for consistency for updating data as per the demand of the policy
Insurance Smart Agent focuses on the bottleneck of the existing system. It has a simple and easy
user friendly interface designed for people with minimum computer knowledge. It primary acts
as a good information center where agents can store the information related to the policy
holders, premium payment, detail of the policies. New policies launched by Insurance Companies
can be added and older can be modified. It will provide the rating of the policies of Insurance
Companies to help the customer to decide the best for them. Premium will be increased, if policy
holder is interested in more benefits like accidental riders, etc. It will generate the due premium
in a particular period. Agents can give attractive schemes for policy holders whose policy is
lapsed with the help of lapsed policy report. It will generate the premium payment receipt on
Further, agency can monitor the productivity of each agent at regular interval to give incentives
for more efficient and productive agents. It will automate the calculation of commission of the
agents. A policy holder can surrender his policy. In case of death of policy holder, the policy will
terminate and sum assured will be given to the nominee or the legal heir.
2. Objectives
There are several main objectives for this project:
• To replace the manual system followed by the agents and be more eco-friendly by reducing
paper wastage.
• To give a well-organized platform for managing all its agents and policy holders.
• To provide prior information to the policy holders to avoid late fee in delayed premium
payment.
3. Tools/Environment Used
3.1 Development Tools and Platform
• Windows 7
• MySQL 5.1.33
• At least 2 GB free space for the installation of MySQL and JRE 6.0 / JDK 1.6.
Software Requirements
4. Analysis Document
4.1 Project Scheduling
Gantt chart
PERT Chart
0 10 10 10 15 25
0 0 10 10 0 25
25 11 36 36 30 66
25 0 36 36 0 66
66 10 76 76 10 86
66 0 76 76 0 86
1. Introduction
The goal of this phase is to understand the exact requirements of the system and to document
them properly. This activity is usually done to document all functions, performance and
1.1 Purpose
• To give a well-organized platform for managing all its agents and policy holders.
• To provide prior information to the policy holders to avoid late fee in delayed premium payment.
Document have written in Calibri Font with 12 font size and double line spacing. Most of the
matter have been numbered to make it more structured. Heading have been highlighted by
This SRS has been target for the developers, team member involved in any activity of the SDLC
and those who are interested for adopting this new system by replacing their existing system with
To replace the manual system followed by the agents and be more eco-friendly by reducing paper
wastage.
• To give a well-organized platform for managing all its agents and policy holders.
• To provide prior information to the policy holders to avoid late fee in delayed premium payment.
2. Overall Description
This product is designed to replace the existing manual system followed by most of the agents to
track the policies status and premium deposit etc. It is an independent self-contained medium
software development package. This product is developed in Java language. It uses g 7.1 to design
its User Interface (Front End). MySql provides the back end for the RDBMS.
• To give a well-organized platform for managing all its agents and policy holders.
• To provide prior information to the policy holders to avoid late fee in delayed premium payment.
There are basically two types of users involved with the operation of this product.
Administrator
Agents
We cannot expect from them high level of expertise in computer and particularly with RDBMS.
They are novice, who have been using manual procedure to maintain this system or may be using
flat file system like word or excel to store the transactions. Owing to the less degree of computer
exposure and knowledge, it has designed to be very simple and user friendly. Keyboard shortcut
have been provided for frequent users. Stress have been given to major less skilled group of users.
3. System Features
ISA replaces the existing system for the newer modules, which helps in maintaining the integrity
and consistency between the modules. Thus keeping in mind a careful study of the requirements
Administrator – Administrator will be able to login to the system and decides whether to view
reports, add new insurer, add new plans, add new agents, generate the commission report,
Agents – Agents can also view and update the limited area of their details. They can view the plan
and add customers, proposal, policy and premium. They can view due premium, lapsed policies
i.) Security: This project is implemented keeping in mind the security issues regarding accessibility
of information or some restricted area. And thus requires credential to access system using
interface.
ii) Reliability: Data access permissions are granted only to the authorized person and database is
password protected. Hence no chance of any mishandling of data can be done by the end users.
iii) Maintainability: There is no issue regarding maintenance of the system. It can be easily
iv) Portability: This is a Java based project, hence it support multiplatform. As java support WORA.
v) Extensibility: This project is based on prototype model keeping in mind the user requirement
can change as the size of an enterprise grows up. Thus it is developed in such a manner, that new
4.0 Requirements
Hardware Requirements
• At least 2 GB free space for the installation of MySQL and JRE 6.0 / JDK 1.6.
Software Requirements
gathered earlier only, based on which designing is to be done. The reason for the selection is due
to its nature that supports multiple life cycles enriching the quality of service. Hence it would give
maximum satisfaction to the clients using it and their feedback will be collected at regular
interval, helping in better improvement of the software. I think that protocol is one of the
software modelling technique from business point of view which always binds the customer with
service provider, as they are always hoping for better release of the software and acts a good
temptation for being in contact of developer and hence increases the possibility of getting more
development chances.
Preliminary Investigation
System Analysis
System Design
Website Coding
Testing
Maintenance
Collect Feedback
Administrator
Creates Agents and allots
Response
username and password
Agent Premium
Management Response Response Management
ISA
Policy Management Customer Details
Response Response
Policy Customer
Management Management
1.4 1.3
Commission Checks Manages Plan
Commission Plans
Admin
Response Response
Insurer Agents
Information Information
1.1 1.2
Manages Manages
Insurer Agents
Response Response
details details
Customer
Management
Response Response
Customer Head
Information
2.1 Heads Details
Customers
Manages
Head
customer
Response
Head details
Response
2.2
Manages
Proposed details
proposed Customers
details
Policy Management
Proposal detail
Response
3.1 Response
Manages
Input details
Policy
Proposal
Proposal
Proposal detail
Response
3.2
Input details
Manages Policy
customer
Response
related details
policy
Premium Management
Policy detail
Response
4.1
Response
Manages
Premium Premium details
Premium
4.2 Response
Manages
Certificates / Period details Certificate
Statement
Agent Management
Agent detail
Response
5.1
Response
Add Agent
Period details
Agent
5.2
Response
Checks
commission Commission
Period details
Plans Insurers
1.1
Adds Insurer 1.4
login
1.6
Edit Plans Check
insurers details
credentials credentials
details
agents details
1.2
Registers Admin Admin
agents
1.6
Change plans details
User & password
password
with details
1.3
Add Plans
agents
1.7 Plans
Checks
commission
commision
2.5
Set Death
Customer Mgr. Status
response
Response
2.4
Edit customer
2.2
Add customer
Customer detail
Customer detail
Customers
2.5.1
Close
policy
2.5.2 Policy
Death Add Death
Customers
3.1.2 3.1.1
compare plan Add proposal
Policy_prop
Policy C_id
3.1
Add proposal
3.7
View status
response
Policy_prop
policy details
Policy Mgr. Select
3.5
proposal 3.2.1
Revivepolicy
Select policy response copy proposal
3.2
plans details Add policy
Policy_no
3.4 Policy detail
Surrender 3.3
Policy updates
Alter Policy Policy
Policy
Policy_no
3.4.1
3.5.1 calculate total
calculate due premium
premium 3.4.3 /3.5.3/3.2.2
calculate
commission
Premium
Commission
3.4.2/3.5.2
Update Policy
Policy
Premium
4.1.2
Calculate premium Policy
late fee
4.1.1 4.4.1
Collect Due Collect Advance
premium premium
4.2
premium details
Pay
premium Premium Mgr.
Update status
Policy_no
4.6.1
4.2.2 Create certificate
Calculate
commission Policy
LP
D
4.5.2
Check last premium premium
Commision
4.6.2
Premium gen certificate
Certificate
Agents
changes
5.4
Edit Profile 5.2
Calculate
deduction
Check
period details credentials
period details
5.1
Calculate
Agent Mgr. Deduction
commission period details
5.5
changes No of policy
5.3
Commission
Check
commission
Policy_pro
Commission
4.5 ER Diagram
Legend
Primary Key
Foreign key
user Ag_id
password name
1 Admin 1 N
gives register Agent N
N
N Branch Password
In_id name In_id
name
N N
1 of
Insurer Offers
adds
N
email Prop_id
type In_id
1
N Ag_id
gives Policy_prop
gives
Cus_id
Pl_id N
In_id Pl_id status
1 1
Plan 1
results N
Table_no of
name
Policy_No 1 Cus_id
Prop_id name
Policy Customer
1
Comm_date H_id
Prem DOB
1
Cer_id marks
Cus_id of
1
Certificate N Pr_id D_id
Policy_No Cus_id
N
C_date
Prem Premium Premiu Death
N m
N
status status
create SA
1 com
com
Com_id
Ag_id
compute
Commission Pr_id
1
N of
(ii) Insurer: Stores the details of the different insurance companies enrolled.
Field Name Field Type Constraints Description
in_id varchar(10) Primary key Stores the unique insurer id.
name varchar(100) Stores the name of the insurer
type varchar(20) Stores the type of the insurance
city varchar(15) Stores the city of the insurer
phone varchar(10) Stores the phone numbers of the insurer
Iv) Agent: Stores the details of the agents of the insurance company.
Field Name Field Type Constraints Description
ag_id int Primary key Stores the unique agent code
user varchar(15) Unique Stores the unique agent username
Password Varchar(30) Not Null Stores the password of the agent
in_id varchar(10) Foreign key Uses the insurer id for the agent.
Name varchar(50) Stores fullname of the agent
Address varchar(100) Stores address of the agent
City varchar(50) Stores city of the agent
Phone varchar(10) Stores phone number of the agent
Email varchar(10) Stores email of the agent
Dob varchar(10) Stores the date of birth of agent
Acc_no varchar(10) Stores the account no
Bank varchar(10) Stores the bank name
(vii) Policy_Prop: Stores the information about policy proposal to the insurer.
Field Name Field Type Constraints Description
prop_id varchar(10) Primary key Stores the unique proposal id
ag_id varchar(10) Foreign key Stores the agent id
pl_id varchar(10) Foreign key Stores the plan id
Cus_id int Foreign key Stores the customer id
Nominee int Foreign key Stores the nominee id
prop_date date Not null Stores the date of the proposal.
SA Int Not null Stores the sum assured of the proposal.
Maturity Int Not null Stores the maturity value of plan.
Term Int Not null Stores the term of the proposal.
Mode varchar(15) Not null Stores the mode of payment of the proposal.
Add_ben blob Stores the additional riders of the proposal.
status varchar(10) Not null Stores the status of the proposal
(viii) Policy: Stores information about different enrolled policy to the customers.
Field Name Field Type Constraints Description
Policy_No Varchar(10) Primary key Stores the policy no. of policy
Prop_id Varchar(10) Foreign key Stores the proposal id
Prem int Not null Stores the premium of the policy
Com_date Date Not null Stores the commencement date
Mat_date date Not null Stores the maturity date
lpd date Not null Store the last premium deposit date.
5. Design Document
5.1 Modules and their description
ISA comprises of five modules. Brief description of each and every module is given below:
(i) Administrator Module: This module will be responsible for administration of the system.
Insurance Companies will be registered by the admin. Insurance plan and scheme will be added
using this module and provide facility to modify them later. It will create new agent and give
username and password to the agents to access the ISA and use the services of ISA. In case of
password forgotten, admin can change the agent’s password. Admin can also supervise the
work of the agents. Using this module, monthly commission and deduction will be calculated
(ii) Customer/Policy Holder Management Module: This module will be responsible for
maintaining the customers or policy holders. Agents after logging in to the system can add new
Customer Head, i.e. the head of a family or the bread earner. Some Insurance schemes are for
securing future of the child; they are children but the life assured is provided to customer head.
After adding the Customer Head, detail of the customer / proposed person for insurance will be
added. It also provides the feature modification of any these detail at later stage. This module
will also mark the death of Life assured person in his death status. Guaranteed sum Assured will
(iii)Policy Management Module: This module will be responsible for managing and supervising
the policies. It will help agents to present the existing plans before the customers and give
comparative benefits of similar type of scheme. It will update the policy proposal status. In case
of bouncing of cheque, amount will be deduction for Agent’s payment. It will store the
information related to policy in case of approval of Policy proposal from both sides i.e. Insurer
and Insured. It will be used to surrender any policy and calculated the amount payable to policy
(iv) Premium Management Module: This module will handle the premium deposited by policy
holder. It will show the due premium of any policy holder and during any period. It will store the
detail of all premium deposited. It also gives the feature of advance premium deposit. It will
generate the outstanding premium, which are yet to be deposited to the Insurer. It will
automate the calculation of commission. It will be used to print premium certificate and
(v) Agent Management Module: This module will be responsible for processing activities related
to agents. It can be used to process any kind query related to commission and deduction of the
agents. Further, it can be used to print the monthly payment of the agents. Agents can edit their
contact information.
The ISA database consists of 14 tables. Each and every table is setup with the proper Integrity
constraints to work properly. The structure of the database tables is given below
(ii) Insurer: Stores the details of the different insurance companies enrolled.
Field Name Field Type Constraints Description
in_id varchar(10) Primary key Stores the unique insurer id.
name varchar(100) Stores the name of the insurer
type varchar(20) Stores the type of the insurance
city varchar(15) Stores the city of the insurer
phone varchar(10) Stores the phone numbers of the insurer
Iv) Agent: Stores the details of the agents of the insurance company.
Field Name Field Type Constraints Description
ag_id int Primary key Stores the unique agent code
user varchar(15) Unique Stores the unique agent username
Password Varchar(30) Not Null Stores the password of the agent
in_id varchar(10) Foreign key Uses the insurer id for the agent.
Name varchar(50) Stores fullname of the agent
Address varchar(100) Stores address of the agent
City varchar(50) Stores city of the agent
Phone varchar(10) Stores phone number of the agent
Email varchar(10) Stores email of the agent
Dob varchar(10) Stores the date of birth of agent
Acc_no varchar(10) Stores the account no
Bank varchar(10) Stores the bank name
(vii) Policy_Prop: Stores the information about policy proposal to the insurer.
Field Name Field Type Constraints Description
prop_id varchar(10) Primary key Stores the unique proposal id
ag_id varchar(10) Foreign key Stores the agent id
pl_id varchar(10) Foreign key Stores the plan id
Cus_id int Foreign key Stores the customer id
Nominee int Foreign key Stores the nominee id
prop_date date Not null Stores the date of the proposal.
SA Int Not null Stores the sum assured of the proposal.
Maturity Int Not null Stores the maturity value of plan.
Term Int Not null Stores the term of the proposal.
Mode varchar(15) Not null Stores the mode of payment of the proposal.
Add_ben blob Stores the additional riders of the proposal.
status varchar(10) Not null Stores the status of the proposal
(viii) Policy: Stores information about different enrolled policy to the customers.
Field Name Field Type Constraints Description
Policy_No Varchar(10) Primary key Stores the policy no. of policy
Prop_id Varchar(10) Foreign key Stores the proposal id
Prem int Not null Stores the premium of the policy
Com_date Date Not null Stores the commencement date
Mat_date date Not null Stores the maturity date
lpd date Not null Store the last premium deposit date.
status Varchar(20) Not null Stores the status of policy.
(`cus_id`);
(`pr_id`),
(`ag_id`);
ON DELETE CASCADE;
(`cus_id`);
DELETE CASCADE;
(`ag_id`);
(`policy_no`);
(`cus_id`),
Administrator Module
Here insurer details will be filled by the administrator which is going to be registered in ISA.
Along with creating a insurer, administrator can registered various schemes and policies given
Create agents
Here agent’s details will be filled by the administrator which is going to be registered in ISA.
Username and Password will be given to the insurer so that the insurer can use the services of
ISA. Along with creating a insurer administrator can supervise their work and number of policies
Change Password
Through this menu administrator can change the password of the agent, in case of agent has
View Reports
• Commission of agents.
With view reports administrator can view the reports against status of the policies, number of
Now the agent will log in to the ISA with the username and password given.
After logging in to the agent’s account, different menu will be displayed out of which customer
• Add Customer Head: Before selling any plan, agent will enter the detail of head of the Life
Assured person.
• Add customer: After creating customer head, agent will enter the detail of Proposed person.
• Set Death Status: Mark any customer as dead and proceed for payment of Insurance Amount.
Now the agent will log in to the ISA with the username and password given.
After logging in to the agent’s account, different menu will be displayed out of which policy
1. Add Policy Proposal: Agents can enter the requirement of the customer and show him the
available policy as per his requirement. He can enter the details of the interested plan like SA,
2. Update status of Policy: Policy proposal’s status can be updated for its approval or denial.
3. Add policy: After approval of proposal, agent enters the details of policy bond agreed upon
both parties.
4. Surrender Policy: Agent can surrender the policy on request of policy holder and inform him
5. Revive Policy: Agent can revive a lapsed policy on the demand of policy holder and payment
of revival amount.
6. Generate Report: Several reports can be generated like Policy done in a period, List of policies
Now the agent will log in to the ISA with the username and password given.
After logging in to the agent’s account, different menu will be displayed out of which premium
1. Check due status of premium: Check status of any policy due premium.
2. Deposit due premium: Agent can deposit a premium given by the customer in cash.
3. Advance premium: Advance premium payment facilities is also provided for customers.
3. Update status of premium: On successful payment of premium, agent will enter the receipt
4. Generate Reports: Several important such as List of due premium, List of premium collected
Now the agent will log in to the ISA with the username and password given.
After logging in to the agent’s account, different menu will be displayed out of which premium
1. Check commission: Agents can check his productivity by checking commission and in a
particular period.
3. Generate Reports: They can generate their monthly payment, commission and deduction.
Error Handling
Error Handling has been an important aspect of system develISAent. Since java provide a better
error handling mechanism, I have selected as the language of DevelISAent. White Box and black
Validation Checks
Validation Checks has been implemented with the help of Java and MySQL with the help of
database constraints.
8. Premium Certificate
9. Premium Receipt.
6. Program Code
Architecture of ISA Project
/* This MDI contain DesktopPane, which have 7 distinct internal frames having similar common
components along with Login form
Very simple & meaning naming convention is used instead of unwanted comments. IDE auto
generated coding for Components and properties have not been added to avoid uneccesary
making project more bulky.
*/
import java.awt.Color;
import java.beans.PropertyVetoException;
import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
/**
*/
public ISA() {
initComponents();
@SuppressWarnings("unchecked")
System.exit(0);
userTf.setText("");
passPwd.setText("");
if(adminRb.isSelected()){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.first();
String user=rs.getString(1);
String pass=rs.getString(2);
String name=rs.getString(3);
String agency=rs.getString(4);
String branch=rs.getString(5);
loginIf.setVisible(false);
insurerBtn.setEnabled(true);
planBtn.setEnabled(true);
customerBtn.setEnabled(true);
policyBtn.setEnabled(true);
premiumBtn.setEnabled(true);
agentBtn.setEnabled(true);
commBtn.setEnabled(true);
resetBtn.doClick();
loginMit.setText("Logout");
userLb.setText("User:"+name);
else{
JOptionPane.showMessageDialog(null,"Permission Denied");
passPwd.setText("");
stmt.close();
con.close();
rs.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
else{
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
boolean check=true;
verify:
while(rs.next()){
String user=rs.getString(2);
String pass=rs.getString(3);
in_code=rs.getInt(4);
code=rs.getInt(1);
name=rs.getString(5);
check=false;
loginIf.setVisible(false);
insurerBtn.setEnabled(false);
planBtn.setEnabled(true);
customerBtn.setEnabled(true);
policyBtn.setEnabled(true);
premiumBtn.setEnabled(true);
agentBtn.setEnabled(false);
commBtn.setEnabled(true);
resetBtn.doClick();
loginMit.setText("Logout");
userLb.setText("User:"+name);
break verify;
if(check){
JOptionPane.showMessageDialog(null,"Permission Denied");
passPwd.setText("");
stmt.close();
con.close();
rs.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try {
insurerIf.setSelected(true);
insurerIf.setVisible(true);
try {
loginIf.setSelected(true);
insurerBtn.setEnabled(false);
planBtn.setEnabled(false);
customerBtn.setEnabled(false);
policyBtn.setEnabled(false);
premiumBtn.setEnabled(false);
agentBtn.setEnabled(false);
commBtn.setEnabled(false);
loginMit.setText("LogIn");
loginIf.setVisible(true);
insurerIf.setVisible(false);
planIf.setVisible(false);
agentIf.setVisible(false);
customerIf.setVisible(false);
policyIf.setVisible(false);
premiumIf.setVisible(false);
commIf.setVisible(false);
userLb.setText("User: Guest");
DefaultTableModel tab=(DefaultTableModel)insurerTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int in_id=rs.getInt(1);
String name=rs.getString(2);
String type=rs.getString(3);
String phone=rs.getString(4);
String city=rs.getString(5);
String email=rs.getString(6);
String website=rs.getString(7);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
catch(Exception e){
try{
catch(Exception e){
DefaultTableModel tab=(DefaultTableModel)insurerTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
String value=searchTf.getText();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int in_id=rs.getInt(1);
String name=rs.getString(2);
String type=rs.getString(3);
String phone=rs.getString(4);
String city=rs.getString(5);
String email=rs.getString(6);
String website=rs.getString(7);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
searchTf.setForeground(Color.black);
searchTf.selectAll();
DefaultTableModel tab=(DefaultTableModel)planTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
String filter="";
if (code!=0){
while(rs.next()){
int pl_id=rs.getInt(1);
int insurer=rs.getInt(2);
String name=rs.getString(3);
String table=rs.getString(4);
String type=rs.getString(5);
int SA=rs.getInt(6);
int term=rs.getInt(7);
int age=rs.getInt(8);
String tax=rs.getString(9);
int maturity=rs.getInt(10);
int comm=rs.getInt(11);
int ext=rs.getInt(12);
int surr=rs.getInt(13);
String benefit=rs.getString(14);
tab.addRow(new Object[]{pl_id, insurer, name, table,type, SA, term, age, tax, maturity,
comm, ext,surr, benefit});
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
catch(Exception e){
try{
catch(Exception e){
DefaultTableModel tab=(DefaultTableModel)planTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
String value=searchTf1.getText();
String filter="";
if (code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int pl_id=rs.getInt(1);
int insurer=rs.getInt(2);
String name=rs.getString(3);
String table=rs.getString(4);
String type=rs.getString(5);
int SA=rs.getInt(6);
int term=rs.getInt(7);
int age=rs.getInt(8);
String tax=rs.getString(9);
int maturity=rs.getInt(10);
int comm=rs.getInt(11);
int ext=rs.getInt(12);
int surr=rs.getInt(13);
String benefit=rs.getString(14);
tab.addRow(new Object[]{pl_id, insurer, name, table,type, SA, term, age, tax, maturity,
comm, ext,surr, benefit});
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
if (code==0){
addBtn1.setEnabled(true);
editBtn1.setEnabled(true);
else{
addBtn1.setEnabled(false);
editBtn1.setEnabled(false);
DefaultTableModel tab=(DefaultTableModel)agentTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int ag_id=rs.getInt(1);
int in_id=rs.getInt(4);
String user=rs.getString(2);
String pass=rs.getString(3);
String name=rs.getString(5);
String address=rs.getString(6);
String phone=rs.getString(8);
String city=rs.getString(7);
String email=rs.getString(9);
String dob=rs.getString(10);
int acc_no=rs.getInt(11);
String bank=rs.getString(12);
tab.addRow(new Object[]{ag_id, user, pass, in_id, name, address, city, phone, email,
dob, acc_no, bank});
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
catch(Exception e){
try{
catch(Exception e){
DefaultTableModel tab=(DefaultTableModel)agentTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
String value=searchTf2.getText();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int ag_id=rs.getInt(1);
int in_id=rs.getInt(4);
String user=rs.getString(2);
String pass=rs.getString(3);
String name=rs.getString(5);
String address=rs.getString(6);
String phone=rs.getString(8);
String city=rs.getString(7);
String email=rs.getString(9);
String dob=rs.getString(10);
int acc_no=rs.getInt(11);
String bank=rs.getString(12);
tab.addRow(new Object[]{ag_id, user, pass, in_id, name, address, city, phone, email,
dob, acc_no, bank});
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultTableModel tab=(DefaultTableModel)customerTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int cus_id=rs.getInt(1);
String f_name=rs.getString(3);
int income=rs.getInt(9);
String name=rs.getString(2);
String address=rs.getString(5);
String phone=rs.getString(7);
String city=rs.getString(6);
String email=rs.getString(8);
String dob=rs.getString(4);
int acc_no=rs.getInt(10);
String bank=rs.getString(11);
String death=rs.getString(12);
int ag_id=rs.getInt(13);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
catch(Exception e){
try{
catch(Exception e){
DefaultTableModel tab=(DefaultTableModel)customerTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
String value=searchTf3.getText();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int cus_id=rs.getInt(1);
String f_name=rs.getString(3);
int income=rs.getInt(9);
String name=rs.getString(2);
String address=rs.getString(5);
String phone=rs.getString(7);
String city=rs.getString(6);
String email=rs.getString(8);
String dob=rs.getString(4);
int acc_no=rs.getInt(10);
String bank=rs.getString(11);
String death=rs.getString(12);
int ag_id=rs.getInt(13);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultTableModel tab=(DefaultTableModel)proposalTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
DefaultTableModel tab1=(DefaultTableModel)maturityTbl.getModel();
tab1.getDataVector().removeAllElements();
tab1.fireTableDataChanged();
DefaultTableModel tab2=(DefaultTableModel)policyTbl.getModel();
tab2.getDataVector().removeAllElements();
tab2.fireTableDataChanged();
String filter="";
if (code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int prop_id=rs.getInt(1);
String ag_name=rs.getString(2);
String pl_name=rs.getString(3);
String cus_name=rs.getString(4);
String nom_name=rs.getString(5);
String prop_date=rs.getString(6);
int SA=rs.getInt(7);
int maturity=rs.getInt(8);
int term=rs.getInt(9);
String mode=rs.getString(10);
String rider=rs.getString(11);
String status=rs.getString(12);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
"SA, proposal.maturity, mat_date, lpd from agent, plan, customer, proposal, policy "+
+filter+";";
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int policy=rs.getInt(1);
String pl_name=rs.getString(3);
String cus_name=rs.getString(2);
String mat_date=rs.getString(6);
int SA=rs.getInt(4);
int maturity=rs.getInt(5);
String lpd=rs.getString(7);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int policy=rs.getInt(1);
String pl_name=rs.getString(3);
String cus_name=rs.getString(2);
int SA=rs.getInt(4);
int maturity=rs.getInt(5);
int term=rs.getInt(6);
String mode=rs.getString(7);
int premium=rs.getInt(8);
String nom_name=rs.getString(9);
String rider=rs.getString(10);
String mat_date=rs.getString(11);
String lpd=rs.getString(12);
String status=rs.getString(13);
String phone=rs.getString(14);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
catch(Exception e){
try{
catch(Exception e){
try{
catch(Exception e){
try{
catch(Exception e){
DefaultTableModel tab2=(DefaultTableModel)policyTbl.getModel();
tab2.getDataVector().removeAllElements();
tab2.fireTableDataChanged();
String value=searchTf4.getText();
String filter="";
if (code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int policy=rs.getInt(1);
String pl_name=rs.getString(3);
String cus_name=rs.getString(2);
int SA=rs.getInt(4);
int maturity=rs.getInt(5);
int term=rs.getInt(6);
String mode=rs.getString(7);
int premium=rs.getInt(8);
String nom_name=rs.getString(9);
String rider=rs.getString(10);
String mat_date=rs.getString(11);
String lpd=rs.getString(12);
String status=rs.getString(13);
String phone=rs.getString(14);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultTableModel tab=(DefaultTableModel)premiumDueTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
DefaultTableModel tab1=(DefaultTableModel)premiumTbl.getModel();
tab1.getDataVector().removeAllElements();
tab1.fireTableDataChanged();
DefaultTableModel tab2=(DefaultTableModel)certificateTbl.getModel();
tab2.getDataVector().removeAllElements();
tab2.fireTableDataChanged();
String filter="";
if (code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int pr=rs.getInt(1);
int policy=rs.getInt(2);
String cus_name=rs.getString(3);
String pl_name=rs.getString(4);
String phone=rs.getString(5);
int premium=rs.getInt(6);
String due=rs.getString(7);
int lpd=rs.getInt(8);
int now=rs.getInt(9);
String mode=rs.getString(10);
int factor=1;
if(mode.equalsIgnoreCase("Half Yearly")){
factor = (now-lpd)/(365/2);
else if(mode.equalsIgnoreCase("Quaterly")){
factor = (now-lpd)/(365/4);
else{
factor = (now-lpd)/365;
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
"premium, late, rec_no, rec_date from agent, plan, customer, proposal, policy,
premium "+
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int pr_id=rs.getInt(1);
int policy=rs.getInt(2);
String cus_name=rs.getString(3);
String f_name=rs.getString(4);
String pl_name=rs.getString(5);
int premium=rs.getInt(6);
String late=rs.getString(7);
int rec_no=rs.getInt(8);
String rec_date=rs.getString(9);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int c_id=rs.getInt(1);
String cus_name=rs.getString(2);
String f_name=rs.getString(3);
String year=rs.getString(4);
int premium=rs.getInt(5);
String c_date=rs.getString(6);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
catch(Exception e){
DefaultTableModel tab=(DefaultTableModel)premiumDueTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
String value=searchTf5.getText();
String filter="";
if (code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int pr_id=rs.getInt(1);
int policy=rs.getInt(2);
String cus_name=rs.getString(3);
String pl_name=rs.getString(4);
String phone=rs.getString(5);
int premium=rs.getInt(6);
String due=rs.getString(7);
int lpd=rs.getInt(8);
int now=rs.getInt(9);
String mode=rs.getString(10);
int factor=1;
if(mode.equalsIgnoreCase("Half Yearly")){
factor = (now-lpd)/(365/2);
else if(mode.equalsIgnoreCase("Quaterly")){
factor = (now-lpd)/(365/4);
else{
factor = (now-lpd)/365;
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try {
planIf.setSelected(true);
planIf.setVisible(true);
try {
agentIf.setSelected(true);
agentIf.setVisible(true);
try {
customerIf.setSelected(true);
customerIf.setVisible(true);
try {
policyIf.setSelected(true);
policyIf.setVisible(true);
try {
premiumIf.setSelected(true);
premiumIf.setVisible(true);
try {
commIf.setSelected(true);
commIf.setVisible(true);
DefaultTableModel tab=(DefaultTableModel)commTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
String filter="";
if (code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int comm_id=rs.getInt(1);
String pr_id=rs.getString(2);
String policy=rs.getString(3);
int comm=rs.getInt(4);
int ded=rs.getInt(5);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultTableModel tab=(DefaultTableModel)commTbl.getModel();
tab.getDataVector().removeAllElements();
tab.fireTableDataChanged();
String value=searchTf.getText();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
int in_id=rs.getInt(1);
String name=rs.getString(2);
String type=rs.getString(3);
String phone=rs.getString(4);
String city=rs.getString(5);
String email=rs.getString(6);
String website=rs.getString(7);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
PrintUtilities.printComponent(insurerTbl);
PrintUtilities.printComponent(policyTbl);
PrintUtilities.printComponent(customerTbl);
PrintUtilities.printComponent(agentTbl);
PrintUtilities.printComponent(policyTbl);
PrintUtilities.printComponent(premiumDueTbl);
PrintUtilities.printComponent(commTbl);
new ProposalAddUI().setVisible(true);
new CertificateUI().setVisible(true);
new ViewMaturedUI().setVisible(true);
aboutDb.setVisible(true);
if(conf==JOptionPane.YES_OPTION){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/test","root","");
Statement stmt=con.createStatement();
importDb.setVisible(true);
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
if (code==0){
addBtn1.setEnabled(true);
editBtn1.setEnabled(true);
else{
addBtn1.setEnabled(false);
editBtn1.setEnabled(false);
java.awt.EventQueue.invokeLater(new Runnable() {
new ISA().setVisible(true);
});
public InsurerAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int id = Integer.parseInt(in_idTf.getText());
+city+"',"+phone+",'"+email+"','"+website+"');";
int rs=stmt.executeUpdate(query);
stmt.close();
con.close();
resetBtn.doClick();id++;
in_idTf.setText(""+id);
catch(Exception e){
dispose();
nameTf.setText("");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
websiteTf.setText("");
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.last();
int in_id=rs.getInt(1)+1;
rs.close();
stmt.close();
con.close();
in_idTf.setText(""+in_id);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new InsurerAddUI().setVisible(true);
});
/**
* Creates new form InsurerAddUI
*/
public InsurerModifyUI() {
initComponents();
}
private void modifyRecBtnActionPerformed(java.awt.event.ActionEvent evt) {
try{
Class.forName("java.sql.Driver");
Connection con=(Connection) DriverManager.getConnection
("jdbc:mysql://localhost/isa","root","");
Statement stmt1=con.createStatement();
int in_id = Integer.parseInt(in_idTf.getText());
String type = (String) typeCb.getSelectedItem();
String city =cityTf.getText();
long phone = Long.parseLong(phoneTf.getText());
String email = emailTf.getText();
String website = websiteTf.getText();
String query="Update Insurer set type='"+type+"', city ='"+city+"', phone ="
+phone+", email ='"+email+"', website ='"+website+"' where in_id="+in_id+";";
int rs=stmt1.executeUpdate(query);
stmt1.close();
con.close();
JOptionPane.showMessageDialog(this,"Record Updated sucessfully");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
websiteTf.setText("");
nameCb.setEnabled(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(this,"Error in Connectivity");
}
}
dispose();
try{
Class.forName("java.sql.Driver");
Connection con=(Connection) DriverManager.getConnection
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int in_id = Integer.parseInt(in_idTf.getText());
int rs=stmt.executeUpdate("delete from insurer where in_id="+in_id+";");
in_idTf.setText("");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
websiteTf.setText("");
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
}
}
}
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
}
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
}
modifyRecBtn.setEnabled(true);
deleteBtn.setEnabled(true);
AGENTADDUI.JAVA
public AgentAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs1.first();
+name+"','"+address+"','"+city+"',"+phone+",'"+email+"','"+dob+"',"+account+",'"+bank+"');";
int rs=stmt.executeUpdate(query);
stmt.close();
con.close();
resetBtn.doClick();ag_id++;
ag_idTf.setText(""+ag_id);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
dispose();
userTf.setText("");
passTf.setText("");
nameTf.setText("");
addressTf.setText("");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
dobTf.setText("");
accountTf.setText("");
bankTf.setText("");
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.last();
int ag_id=rs.getInt(1)+1;
while(rs1.next()){
String insurer=rs1.getString(1);
insurerCb.addItem(insurer);
rs.close();
stmt.close();
con.close();
ag_idTf.setText(""+ag_id);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new AgentAddUI().setVisible(true);
});
AGENTMODIFYUI.JAVA
public AgentModifyUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt1=con.createStatement();
int rs=stmt1.executeUpdate(query);
stmt1.close();
con.close();
ag_idCb.setSelectedIndex(0);
userTf.setText("");
passTf.setText("");
nameTf.setText("");
addressTf.setText("");
cityTf.setText("");
phoneTf.setText("");
insurerTf.setText("");
emailTf.setText("");
dobTf.setText("");
accountTf.setText("");
bankTf.setText("");
ag_idCb.setEnabled(true);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
dispose();
if(conf==JOptionPane.YES_OPTION){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
ag_idCb.setSelectedIndex(0);
userTf.setText("");
passTf.setText("");
nameTf.setText("");
insurerTf.setText("");
addressTf.setText("");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
dobTf.setText("");
accountTf.setText("");
bankTf.setText("");
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultComboBoxModel combo1=(DefaultComboBoxModel)ag_idCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
String name=rs.getString(1);
combo1.addElement(name);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
deleteBtn.doClick();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.first();
String user=rs.getString(2);
userTf.setText(user);
String pass=rs.getString(3);
passTf.setText(pass);
int in_id=rs.getInt(4);
String name=rs.getString(5);
nameTf.setText(name);
String address=rs.getString(6);
addressTf.setText(address);
String city=rs.getString(7);
cityTf.setText(city);
String phone=rs.getString(8);
phoneTf.setText(phone);
String email=rs.getString(9);
emailTf.setText(email);
String dob=rs.getString(10);
dobTf.setText(dob);
String account=rs.getString(11);
accountTf.setText(account);
String bank=rs.getString(12);
bankTf.setText(bank);
rs.close();
rs1.first();
String insurer=rs1.getString(1);
insurerTf.setText(insurer);
rs1.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
modifyRecBtn.setEnabled(true);
deleteBtn.setEnabled(true);
ag_idCb.setEnabled(false);
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new AgentModifyUI().setVisible(true);
});
CERTIFICATEUI.JAVA
public CertificateUI() {
initComponents();
DefaultTableModel tab=(DefaultTableModel)detailTb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
customerLbl.setText(cus);
ResultSet rs=stmt.executeQuery(query);
int total=0;
while(rs.next()){
tab.addRow(new Object[]{pr_id,policy,plan,premium});
totalLbl.setText(""+total);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
dispose();
DefaultComboBoxModel combo1=(DefaultComboBoxModel)customerCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
customerCb.addItem(cus);
rs1.last();
int cer_id=rs1.getInt(1)+1;
rs.close();
stmt.close();
con.close();
cerTf.setText(""+cer_id);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
PrintUtilities.printComponent(this);
CUSTOMERADD.JAVA
public CustomerAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.last();
int cus_id=rs.getInt(1)+1;
rs.close();
stmt.close();
con.close();
cus_idTf.setText(""+cus_id);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
nameTf.setText("");
addressTf.setText("");
fatherTf.setText("");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
dobTf.setText("");
incomeTf.setText("");
accountTf.setText("");
bankTf.setText("");
dispose();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int ag_code=ISA.code;
if(ISA.code==0){
ag_code=1;
+city+"',"+phone+",'"+email+"',"+income+","+account+",'"+bank+"','Alive',"+ag_code+");";
int rs=stmt.executeUpdate(query);
stmt.close();
con.close();
resetBtn.doClick();cus_id++;
cus_idTf.setText(""+cus_id);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
java.awt.EventQueue.invokeLater(new Runnable() {
new CustomerAddUI().setVisible(true);
});
CUSTOMERMODIFYI.JAVA
public CustomerModifyUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt1=con.createStatement();
int rs=stmt1.executeUpdate(query);
stmt1.close();
con.close();
fatherTf.setText("");
addressTf.setText("");
cityTf.setText("");
dobTf.setText("");
phoneTf.setText("");
emailTf.setText("");
incomeTf.setText("");
accountTf.setText("");
bankTf.setText("");
deathTf.setText("");
nameCb.setEnabled(true);
viewBtn.setEnabled(true);
modifyRecBtn.setEnabled(false);
deleteBtn.setEnabled(false);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
dispose();
if(conf==JOptionPane.YES_OPTION){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
cus_idTf.setText("");
fatherTf.setText("");
addressTf.setText("");
cityTf.setText("");
dobTf.setText("");
phoneTf.setText("");
emailTf.setText("");
incomeTf.setText("");
accountTf.setText("");
bankTf.setText("");
deathTf.setText("");
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultComboBoxModel combo1=(DefaultComboBoxModel)nameCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
String name=rs.getString(1);
combo1.addElement(name);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
deleteBtn.doClick();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
nameCb.setEnabled(false);
ResultSet rs=stmt.executeQuery(query);
rs.first();
String cus_id=rs.getString(1);
String father=rs.getString(3);
String dob=rs.getString(4);
String address=rs.getString(5);
String city=rs.getString(6);
String phone=rs.getString(7);
String email=rs.getString(8);
String income=rs.getString(9);
String account=rs.getString(10);
String bank=rs.getString(11);
String death=rs.getString(12);
cus_idTf.setText(cus_id);
fatherTf.setText(father);
addressTf.setText(address);
cityTf.setText(city);
dobTf.setText(dob);
phoneTf.setText(phone);
emailTf.setText(email);
incomeTf.setText(income);
accountTf.setText(account);
bankTf.setText(bank);
deathTf.setText(death);
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
modifyRecBtn.setEnabled(true);
deleteBtn.setEnabled(true);
deadBtn.setEnabled(true);
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new CustomerModifyUI().setVisible(true);
});
//
INSURERADDUI.JAVA
public InsurerAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int id = Integer.parseInt(in_idTf.getText());
+city+"',"+phone+",'"+email+"','"+website+"');";
int rs=stmt.executeUpdate(query);
stmt.close();
con.close();
resetBtn.doClick();id++;
in_idTf.setText(""+id);
catch(Exception e){
dispose();
nameTf.setText("");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
websiteTf.setText("");
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.last();
int in_id=rs.getInt(1)+1;
rs.close();
stmt.close();
con.close();
in_idTf.setText(""+in_id);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new InsurerAddUI().setVisible(true);
});
INSURERMODIFYUI.JAVA
public InsurerModifyUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt1=con.createStatement();
int rs=stmt1.executeUpdate(query);
stmt1.close();
con.close();
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
websiteTf.setText("");
nameCb.setEnabled(true);
catch(Exception e){
JOptionPane.showMessageDialog(this,"Error in Connectivity");
dispose();
if(conf==JOptionPane.YES_OPTION){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
in_idTf.setText("");
cityTf.setText("");
phoneTf.setText("");
emailTf.setText("");
websiteTf.setText("");
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultComboBoxModel combo1=(DefaultComboBoxModel)nameCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
String name=rs.getString(1);
combo1.addElement(name);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
deleteBtn.doClick();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
nameCb.setEnabled(false);
ResultSet rs=stmt.executeQuery(query);
rs.first();
String in_id=rs.getString(1);
String type=rs.getString(3);
String city=rs.getString(4);
String phone=rs.getString(5);
String email=rs.getString(6);
String website=rs.getString(7);
in_idTf.setText(in_id);
typeCb.setSelectedItem(type);
phoneTf.setText(phone);
cityTf.setText(city);
emailTf.setText(email);
websiteTf.setText(website);
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
modifyRecBtn.setEnabled(true);
deleteBtn.setEnabled(true);
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new InsurerModifyUI().setVisible(true);
});
PLANADDUI.JAVA
public PlanAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int pl_id=Integer.parseInt(pl_idTf.getText());
rs.first();
rs.close();
String name=nameTf.getText();
String table=tableTf.getText();
long SA=Long.parseLong(minSATf.getText());
int term=Integer.parseInt(minTermTf.getText());
int age=Integer.parseInt(minAgeTf.getText());
String tax=taxTf.getText();
long maturity=Long.parseLong(maturityTf.getText());
int comm=Integer.parseInt(commTf.getText());
int ext=Integer.parseInt(extTermTf.getText());
int surr=Integer.parseInt(surrenderTf.getText());
String benefit=benefitTf.getText();
minTermTf.setText("");
minAgeTf.setText("");
+SA+","+term+","+age+",'"+tax+"',"+maturity+","+comm+","+ext+","+surr+",'"+benefit+"');";
int rs1=stmt.executeUpdate(query);
pl_id++;
pl_idTf.setText(""+pl_id);
con.close();
resetBtn.doClick();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
dispose();
nameTf.setText("");
tableTf.setText("");
maturityTf.setText("");
commTf.setText("");
extTermTf.setText("");
surrenderTf.setText("");
benefitTf.setText("");
minSATf.setText("");
minTermTf.setText("");
minAgeTf.setText("");
taxTf.setText("");
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.last();
int pl_id=rs.getInt(1)+1;
pl_idTf.setText(""+pl_id);
DefaultComboBoxModel combo1=(DefaultComboBoxModel)insurerCb.getModel();
while(rs1.next()){
String name=rs1.getString(1);
combo1.addElement(name);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new PlanAddUI().setVisible(true);
});
PLANMODIFYUI.JAVA
public PlanModifyUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int pl_id=Integer.parseInt(pl_idTf.getText());
String insurer=insurerTf.getText();
rs.first();
rs.close();
String table=tableTf.getText();
long SA=Long.parseLong(minSATf.getText());
int term=Integer.parseInt(minTermTf.getText());
int age=Integer.parseInt(minAgeTf.getText());
String tax=taxTf.getText();
long maturity=Long.parseLong(maturityTf.getText());
int comm=Integer.parseInt(commTf.getText());
int ext=Integer.parseInt(extTermTf.getText());
int surr=Integer.parseInt(surrenderTf.getText());
String benefit=benefitTf.getText();
+SA+",min_term="+term+",min_age="+age+",tax='"+tax+"',maturity="+maturity+",comm="+co
mm+
",ext_term="+ext+",surr_factor="+surr+",benefit='"+benefit+"'where pl_id="+pl_id+";";
int rs1=stmt.executeUpdate(query);
stmt.close();
con.close();
nameCb.setEnabled(true);
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
dispose();
if(conf==JOptionPane.YES_OPTION){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
pl_idTf.setText("");
insurerTf.setText("");
tableTf.setText("");
maturityTf.setText("");
commTf.setText("");
extTermTf.setText("");
surrenderTf.setText("");
benefitTf.setText("");
minSATf.setText("");
minTermTf.setText("");
minAgeTf.setText("");
taxTf.setText("");
viewBtn.setEnabled(false);
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultComboBoxModel combo1=(DefaultComboBoxModel)nameCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
String name=rs.getString(1);
combo1.addElement(name);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
deleteBtn.doClick();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.first();
int pl_id=rs.getInt(1);
pl_idTf.setText(""+pl_id);
String table=rs.getString(4);
tableTf.setText(table);
String type=rs.getString(5);
typeCb.setSelectedItem(type);
int SA=rs.getInt(6);
minSATf.setText(""+SA);
int term=rs.getInt(7);
minTermTf.setText(""+term);
int age=rs.getInt(8);
minAgeTf.setText(""+age);
String tax=rs.getString(9);
taxTf.setText(tax);
int maturity=rs.getInt(10);
maturityTf.setText(""+maturity);
int comm=rs.getInt(11);
commTf.setText(""+comm);
int ext=rs.getInt(12);
extTermTf.setText(""+ext);
int surr=rs.getInt(13);
surrenderTf.setText(""+surr);
String benefit=rs.getString(14);
benefitTf.setText(benefit);
int in_id=rs.getInt(2);
rs.close();
rs1.first();
String insurer=rs1.getString(1);
insurerTf.setText(insurer);
rs1.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
modifyRecBtn.setEnabled(true);
deleteBtn.setEnabled(true);
nameCb.setEnabled(false);
PrintUtilities.printComponent(this);
java.awt.EventQueue.invokeLater(new Runnable() {
new PlanModifyUI().setVisible(true);
}); }
POLICYADDUI.JAVA
public PolicyAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int rs=stmt.executeUpdate(query);
rs1.last();
rs3.first();
rs5.last();
stmt.close();
con.close();
resetBtn.doClick();
dispose();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
dispose();
com_dateTf.setText("");
premiumTf.setText("");
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
String prop_id=rs.getString(1);
propCb.addItem(prop_id);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
try {
Class.forName("java.sql.Driver");
propCb.setEnabled(false);
ResultSet rs = stmt.executeQuery(query);
rs.first();
String SA = rs.getString(4);
nameTf.setText(cus);
fnameTf.setText(fname);
planTf.setText(plan);
modeTf.setText(mode);
termTf.setText(term);
SATf.setText(SA);
maturityTf.setText(maturity);
riderTf.setText(rider);
stmt.close();
con.close();
} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
java.awt.EventQueue.invokeLater(new Runnable() {
new PolicyAddUI().setVisible(true);
});
POLICYMODIFYUI.JAVA
String surr="";
public PolicyModifyUI() {
initComponents();
DefaultComboBoxModel combo1=(DefaultComboBoxModel)policyCb.getModel();
DefaultComboBoxModel combo2=(DefaultComboBoxModel)planCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
while(rs.next()){
String name=rs.getString(1);
combo1.addElement(name);
while(rs1.next()){
String name=rs1.getString(1);
combo2.addElement(name);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
PrintUtilities.printComponent(this);
try {
Class.forName("java.sql.Driver");
surr=policy_no;
policyCb.setEnabled(false);
ResultSet rs = stmt.executeQuery(query);
rs.first();
String SA = rs.getString(4);
planCb.setSelectedItem(plan);
nameTf.setText(cus);
fnameTf.setText(fname);
modeTf.setText(mode);
termTf.setText(term);
SATf.setText(SA);
maturityTf.setText(maturity);
riderTf.setText(rider);
premiumTf.setText(premium);
com_dateTf.setText(com_date);
mat_dateTf.setText(mat_date);
lpddateTf.setText(lpd);
statusTf.setText(status);
if(status.equalsIgnoreCase("Lapsed")){
reviveBtn.setEnabled(true);
stmt.close();
con.close();
catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
surrenderBtn.setEnabled(true);
switchBtn.setEnabled(true);
planCb.setEnabled(true);
if(conf==JOptionPane.YES_OPTION){
try{
Class.forName("java.sql.Driver");
rs1.first();
int pl_id=rs1.getInt(1);
rs2.first();
int prop_id=rs2.getInt(1);
dispose();
catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
switchBtn.setEnabled(true);
if(conf==JOptionPane.YES_OPTION){
try{
Class.forName("java.sql.Driver");
dispose();
catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
try{
Class.forName("java.sql.Driver");
rs.first();
if(mode.equalsIgnoreCase("Half Yearly")){
factor = 2;
else if(mode.equalsIgnoreCase("Quaterly")){
factor = 4;
else{
factor = 1;
for(int i=1;i<=totalPremium;i++){
rs1.last();
rs3.first();
rs5.last();
catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
java.awt.EventQueue.invokeLater(new Runnable() {
new PolicyModifyUI().setVisible(true);
});
PREMIUMADDUI.JAVA
public PremiumAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
String rec_date=rec_dateTf.getText();
String pr_id=pr_idTf.getText();
rs3.first();
rs5.last();
policy_noCb.setEnabled(true);
catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
dispose();
nameTf.setText("");
planTf.setText("");
premiumTf.setText("");
lateTf.setText("");
DefaultComboBoxModel combo2=(DefaultComboBoxModel)policy_noCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs1.last();
pr_idTf.setText(""+pr_id);
while(rs.next()){
String policy=rs.getString(1);
combo2.addElement(policy);
rs1.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
try {
Class.forName("java.sql.Driver");
policy_noCb.setEnabled(false);
ResultSet rs = stmt.executeQuery(query);
rs.first();
nameTf.setText(name);
premiumTf.setText(premium);
planTf.setText(plan);
rec_dateTf.setText(date);
stmt.close();
con.close();
catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
java.awt.EventQueue.invokeLater(new Runnable() {
new PremiumAddUI().setVisible(true);
});
PRINTUTILITIESUI.JAVA
import java.awt.*;
import javax.swing.*;
import java.awt.print.*;
import javax.swing.JOptionPane;
/**
*/
new PrintUtilities(c).print();
this.componentToBePrinted = componentToBePrinted;
printJob.setPrintable(this);
if (printJob.printDialog())
try {
printJob.print();
} catch(PrinterException pe) {
JOptionPane.showMessageDialog(null,"Error in Printing");
if (pageIndex > 0) {
return(NO_SUCH_PAGE);
} else {
g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
disableDoubleBuffering(componentToBePrinted);
componentToBePrinted.paint(g2d);
enableDoubleBuffering(componentToBePrinted);
return(PAGE_EXISTS);
* @see enableDoubleBuffering
*/
currentManager.setDoubleBufferingEnabled(false);
currentManager.setDoubleBufferingEnabled(true);
PROPOSALADDUI.JAVA
public ProposalAddUI() {
initComponents();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
int ag_id=ISA.code;
if(ISA.code==0){
ag_id=1;
long SA = Long.parseLong(SATf.getText());
rs1.first();
int min_term=rs1.getInt(1);
int min_SA=rs1.getInt(2);
int pl_id=rs1.getInt(3);
SATf.setText(""+min_SA);
termTf.setText(""+min_term);
rs2.first();
int cus_id=rs2.getInt(1);
rs3.first();
int nom_id=rs3.getInt(1);
if(conf==JOptionPane.YES_OPTION){
+nom_id+",curdate(),"+SA+","+maturity+","+term+",'"+mode+"','"+rider+"','Processing');";
int rs=stmt.executeUpdate(query);
prop_id++;
prop_idTf.setText(""+prop_id);
stmt.close();
con.close();
resetBtn.doClick();
catch(Exception e){
dispose();
fnameTf.setText("");
n_fnameTf.setText("");
dobTf.setText("");
n_dobTf.setText("");
termTf.setText("");
riderTf.setText("");
SATf.setText("");
maturityTf.setText("");
DefaultComboBoxModel combo1=(DefaultComboBoxModel)customerCb.getModel();
DefaultComboBoxModel combo2=(DefaultComboBoxModel)planCb.getModel();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.last();
int prop_id=rs.getInt(1)+1;
prop_idTf.setText(""+prop_id);
rs.close();
while(rs2.next()){
String p = rs2.getString(1);
combo2.addElement(p);
rs2.close();
while(rs1.next()){
String c = rs1.getString(1);
combo1.addElement(c);
rs1.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
addRecBtn.doClick();
PrintUtilities.printComponent(this);
DefaultComboBoxModel combo2=(DefaultComboBoxModel)nomineeCb.getModel();
combo2.removeAllElements();
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.first();
fnameTf.setText(rs.getString(1));
dobTf.setText(rs.getString(2));
while(rs1.next()){
String c = rs1.getString(1);
combo2.addElement(c);
rs1.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
rs.first();
n_fnameTf.setText(rs.getString(1));
n_dobTf.setText(rs.getString(2));
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
java.awt.EventQueue.invokeLater(new Runnable() {
new ProposalAddUI().setVisible(true);
});
VIEWMATUREDUI.JAVA
public ViewMaturedUI() {
initComponents();
PrintUtilities.printComponent(this);
DefaultTableModel tab2=(DefaultTableModel)maturityTbl.getModel();
tab2.getDataVector().removeAllElements();
tab2.fireTableDataChanged();
String filter="";
if (ISA.code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
"SA, proposal.maturity, mat_date, lpd from agent, plan, customer, proposal, policy "+
+filter+";";
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int policy=rs.getInt(1);
String pl_name=rs.getString(3);
String cus_name=rs.getString(2);
String mat_date=rs.getString(6);
int SA=rs.getInt(4);
int maturity=rs.getInt(5);
String lpd=rs.getString(7);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
DefaultTableModel tab2=(DefaultTableModel)maturityTbl.getModel();
tab2.getDataVector().removeAllElements();
tab2.fireTableDataChanged();
String value=searchTf.getText();
String filter="";
if (ISA.code!=0){
try{
Class.forName("java.sql.Driver");
("jdbc:mysql://localhost/isa","root","");
Statement stmt=con.createStatement();
"SA, proposal.maturity, mat_date, lpd from agent, plan, customer, proposal, policy "+
ResultSet rs=stmt.executeQuery(sql1);
while(rs.next()){
int policy=rs.getInt(1);
String pl_name=rs.getString(3);
String cus_name=rs.getString(2);
String mat_date=rs.getString(6);
int SA=rs.getInt(4);
int maturity=rs.getInt(5);
String lpd=rs.getString(7);
rs.close();
stmt.close();
con.close();
catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
searchBtn.doClick();
java.awt.EventQueue.invokeLater(new Runnable() {
new ViewMaturedUI().setVisible(true);
});
7. Testing
7.1 Test Strategies and Techniques
Testing is a important and integral part of SDLC. It ensures the effort of programmer are not
fruitless. As the project undertaken by me is RDBMS, the database integral referentiality enforces
robustness along with superb exception handling of java. Still I have framed many test cases to
ensure the correctness of the program. Unit Testing of modules and function included in these
modules are tested using white box tesing, in which I have all possible input to check all possible
program flow to avoid any inconvience caused to the clients. Integral or System testing have
been done ensure correct functioning and achieving the overall objective of development.
Procedure
Expected Outcome User cannot logged in and Permission Denied message will be displayed.
Procedure
Expected Outcome An error alert message would be displayed showing that please enter the
Procedure
Expected Outcome An error alert message would be displayed showing that please enter the
Procedure
Expected Outcome An error alert message would be displayed showing that please enter the
Procedure
Expected Outcome An error alert message would be displayed showing that please enter the
Procedure
Expected Outcome An error alert message would be displayed showing that please enter the Min
Procedure
Expected Outcome An error alert message would be displayed showing that please enter the
Insurer Manager
Add Insurer
Modify Insurer
Plan Manager
Add Plan
Modify Plan
Agent Manager
Add Agent
Modify Agent
Customer Manager
Add Customer
Modify Customer
Policy Manager
Add Proposal
Add Policies
Modify Policy
Premium Manager
Issue Certificate
Add Premium
Commission Manager
Security is of prime importance for this application, where various user, who are competitors to
each other’s, provides their important and valuable data to the system. To prevent any
compromise with the security of the system and integrity of data, a multi-level security system is
User Authentication is used to check and maintain the user privileges to various pages. User
groups plays an important role in doing so, which is implemented. Database and data security
has been achieved by creating different roles for users. The agents are not authorized to view or
Since in this project, following were the security requirements is being considered:
2. Administrator have a right to delete unnecessary information and their data whenever they
Keeping above factors in mind, the users are divided into following orders:
1. Admin
2. Agents
The above roles pertaining users will be decided by admin only. There will be one admin account
after successful installation of project. Further the agents can be added as per requirement by
the admin. The agents can some share information like customer’s detail and hide other private
information. Even they can view the commission they have earned.
crisis. I have tried my best in developing this solution for above problem. But still aspect are
1. I could not automate the calculation of premium of a policy. As LCI, one of the major
insurer have given premium in the form tabular information based on age, term and
sum assured. There was no such formula to calculate premium. Premium have to be
premium himself at some other counter or does not give any information to the
• Intranet Technology could be extended to Internet without any modification to support multi
branch facility.
• Payment module – This module can be added to ISA for maintaining the payment from the plans
• SMS Module - This module will be added to the ISA for giving reminder using SMS to policy
12. Bibliography
Some important sources for the develISAent of Insurance System proposal are as follows: