Online Voting Sytem Mini Project 2011
Online Voting Sytem Mini Project 2011
INTRODUCTION
1.1 GENERAL
Online voting system gathers its own significance since the NRI voting Rights bill have been
passed by the parliament on Feb 11 ,2011. . The new law will allow an Indian citizen residing
abroad to enroll in voter’s list and exercise his franchise even if he or she remained away from
place of residence in India for more than six months owing to employment, education or
otherwise. In the present case the person should be present within the constituency on the day of
polling for exercising his right to vote.
Thus our project, online voting should enhance the opportunities of voters outside the country
to vote for their nation on implementation.
1.3.1. LINUX
Linux is an operating system, a software program that controls your computer.
Most vendors load an operating system onto the har d drive of a PC before delivering the PC.
Linux is distinguished from many popular operating systems in three important ways:
Linux is a cross-platform operating system that runs on many computer models. Only UNIX, an
ancestor of Linux, rivals Linux in this respect.Linux is free, in two senses. First, you may pay
nothing to obtain and use Linux. On the other hand, you may choose to purchase Linux from a
vendor who bundles Linux with special documentation or applications, or who provides
technical support. However, even in this case, the cost of Linux is likely to be a fraction of what
you'd pay for another operating system. So, Linux is free or nearly free in an economic sense.
ADVANTAGES OF LINUX
Linux source code is freely distributed. Tens of thousands of programmers have reviewed the
source code to improve performance, eliminate bugs, and strengthen security. No other
operating system has ever undergone this level of review. This Open Source design has created
most of the advantages listed below.
Linux has no vendor lock-in. The availability of source code means that every user and support
provider is empowered to get to the root of technical problems quickly and effectively. This
contrasts sharply with proprietary operating systems, where even top-tier support providers must
rely on the OS vendor for technical information and bug fixes.
Linux runs on a wide range of hardware. Most Linux systems are based on standard PC
hardware, and Linux supports a very wide range of PC devices. However, it also supports a wide
range of other computer types, including Alpha, Power PC, 680x0, SPARC, and Strong Arm
processors, and system sizes ranging from PDAs
Linux has the tools and applications you need. Programs ranging from the market-dominating
Apache web server to the powerful GIMP graphics editor are included in most Linux
distributions. Free and commercial applications meet are available to meet most application
needs.
Linux interoperates with many other types of computer systems. Linux communicates using
the native networking protocols of Unix, Microsoft Windows 95/NT, IBM OS/2, Netware, and
Macintosh systems and can also read and write disks and partitions from these and other
operating systems.
Linux has a low total cost of ownership. Although the Linux learning curve is significant, the
stability, design, and breadth of tools available for Linux result in very low ongoing operating
costs.
Linux: all for one and one for all?? All changes one makes in Open Source software will
benefit each and everyone, all over the world. Without exceptions or constraints.
1.3.2. JAVA
Soucecode1.java Sourcecode2.java
COMPILES
Sourcecode1.class Sourcecocde2.class
RUNTIME
Java Virtual
The second useful thing is that it does not matter how they go about manipulating their
properties. Thus Beans act as mysterious black boxes with switches and read-outs.
There are three kinds of enterprise beans: session beans, entity beans, and message
driven beans. Enterprise bean often interact with the database. The original JavaBeans
specification is based on the java beans package, which is a standard package in the JDK.EJB, is
a framework for writing distributed programs. It involves a standardized agreement that enables
a component to run within any application server (increasing code reuse).The agreement is
accomplished by implementing a set of java interfaces from the EJB API.EJBs are not GUI
components.
Request Request
Response Response
SERV
LET
Java Script
Web Browser Web Server
Fig1. 3.2: Execution of Java Servlet
The Java Script is a commonly used scripting language for HTML pages. The scripting
languages are mainly used for client side validation purpose. As we know the scripting
statements are sent to the client machine and executed there during the client operations, it
reduces the work load of server. The other features are:
It has procedural capabilities,
Platform independent
Low disc space needed
Easy debugging and testing
1.3.5 HTML
It is a language used for the specification of structural markup. HTML give the web
authors the means to publish online documents with headings,texts,tables,lists,photos,etc.HTML
is used in our program to create forms in the server side for entering, updating and viewing the
server applications in a user friendly environment.
1.3.6 JDBC
JDBC is a Java API for executing SQL statements. It consists of classes and interfaces
written in the Java Programming language. JDBC provides a standard API tool for database
developers and make s it possible to write database applications using a pure Java API.
1.3.6 MYSQL
MySQL provides our small, medium and large enterprise customers with affordable,
open access to their web data warehouses. MySQL allows us to offer our System Administrator
low cost, low maintenance database solution for applications without sacrificing power,
performance or scalability.
It has cleanly separated table handler modules and can mix access to different type of
tables.
It seems to be developed iteratively, and the features are very stable when they ship them.
It is a relational database. Over the past several years, this relational database
management systems have become the most widely accepted way to manage data.
It offers benefits such as:
Easy to access data
Flexibility in data modeling
Reduced data storage and redundancy
Independence of physical storage and logical data design
A high level data manipulation language
REQUIREMENT
SPECIFICATION
Requirement Specification is the part of the project which gives the details about the
hardware and software requirements of our project. It also details the features of the
programming language used.
In order to implement a new system the choice of processor with maximum possible speed is
made. There should be sufficient memory to store data and software tools for efficient
processing.
Processor : Pentium IV
Platform : Linux
Language used : J2EE
SYSTEM ANALYSIS
AND
DESIGN
3. SYSTEM ANALYSIS
System analysis is the process of gathering and interpreting facts, diagnosing problems
and the information to recommended improvements on the system. System analysis is a problem
solving activity that requires intensive communication between the system users and system
developers. System analysis or study is an important phase of any system development process.
The system is studied to the minutest detail and analyzed. The system analyst plays the role of
the interrogator and dwells deep into the working of the present system. The system is viewed
as a whole and the input to the system are identified. The outputs from the organizations are
traced to the various processes.
The government to do this process manually wastes a lot of time and money. Thus the present
system proves itself to be an inefficient one. The existing system is not web based. The user or
person must want to go to the polling station for casting their votes.
Data flow diagrams were invented by Larry Constantine, the original developer of
structured design, based on Martin and Estrin’s “data flow graphs” model of computation. Data
flow diagrams (DFD’s) are one of the three essential perspectives of Structured System
Analysis and Design Method SSADM. The sponsor of the project and the end users will need to
be brief and consulted through out all stages of a system’s evolution. With a data flow diagram
users are able to visualize how the system will operate, what the system will accomplish, and
how the system will be implemented. The old system’s data flow diagrams can be drawn up and
compared with new system’s data flow diagrams to draw comparisons to implement a more
efficient system. Diagram
Elements of a DFD
There are 4 key elements in a Data Flow diagram, Processes, Data Flows, Data stores,
and external entities.
SYMBOLS DESCRIPTION
EXTERNAL ENTITIES
(INPUT/OUTPUT)
PROCESSES
DATAFLOWS
DATA STORES
Table3.1.Elements of DFD
The Process entity identifies a process taking place, it must have atleast one input and
output. A process with no input is known as “miracle process”. An output is a “black hole
process”. Each process has the following:
A Number,A Name (verb phrase),A Description,At least one input,At least one output
The Data Flow entity identifies the flow of data between processes, data stores and
external entities. A data flow cannot connect an external entity to a data source, at least one
connection must be with a process. There are also “physical” flows, i.e. those that use a physical
medium, like a membership card. Each data flow has the following:
A name (Noun),A Description ,One or more connection to a process
The Data Store entity identifies stores of data, both manual and electronic. Electronic or
“digital” stores are identified by the letter D, and manual filing systems by the letter M. Each
data store has the following:
A numberA name,A description, One or more input data flows,One or more output data flows
The External Entity identifies external entities which interact with the system, usually
clients but can be within the same entity, e.g. the same doctor shown twice on the same diagram
Preliminary or general design: In the preliminary or general design, the features of the new
system are specified. The costs of implementing these features and benefits to be derived are
estimated. If the project is still considered to be feasible, we move to detailed design stage.
Structure or detailed design: In the detailed design stage, computer oriented work begins
in the earnest. At this stage, the design of the system becomes more structured. Structured
design is a blue print of a computer system solution to a given problem having the same
components and inter- relationship among the same components as the original problem. Input,
output and processing specifications are drawn up in detail .In the design stage, the
programming language and the platform in which the new system will run are also decided.
There are several tools and techniques used for designing.
Simple designs are easily understood, easily built, and easily tested. Simplicity is the
most important criteria of a design. Other design criteria include the following:
Testability: In a good design, every requirement is testable. A design that cannot be easily tested
Modularity: A good design is modular and exhibits the properties of high cohesiveness and low
coupling.
Representation: A good design should be easily communicated to all interested parties through
Administrator Module
User Module
User interface consists of a login name and unique password using which he/she can
login into the Online Voting System. This will be supplied by the administrator to the user. Once
the user has logged in, he has the privilege to view the names of the candidates listed by the
administrator, view the results after the termination date of the election. The user module
constitutes only one sub module:
Authentication & Voting
• Each voter is provided with unique username and password manually by the
administrator. The voter uses the username and password for login and exercise the
fundamental right of voting. if incorrect username and password entered, the access to is
denied to the user. And also voter is allowed to vote only once. This is the security
feature provided against external access of the system.
• After login the voter enters the voter home page ,which provides the links :
Candidate List
This facilitates the voter to view the candidate names, the constituency name, their
symbol and their party name.
ADMINISTRATOR MODULE
Administrator interface consists of a login name and unique
password using which admin can login into the Online Voting System. Administrator has the
main control of the system. By logging into the page it can perform the following tasks.
Add Candidate
Here the admin can add the list of candidates in the election. It includes candidates name,
address.gender,party, party symbol etc. The candidates will be added to the list only after
completing the procedures.
Add Voter
Here the voters can be added to the database. The voters have also the privilege to check the
voters list from the homepage. The voters details includes name, address, gender, age,
constituency, image etc.
Add Election
Here the election to be conducted is selected. To add an election the constituency should be
selected and termination date of election should be specified.
Voters List
Here we can view the voters list. Each constituency will be having separate voters list.
Candidate List
The list of candidates participating in the election can be seen. It includes the candidates name,
party name and party symbol.
Voting Structure
Here the eligible voters who are permitted to login to the system can utilize the right to vote.
Each voter can register a single vote to a candidate’s favour in his/her constituency. The security
measures taken within the system prevents them from exercising their votes again i.e. the second
vote by the same user goes invalid. The starting and ending dates of the election are specified by
the administrator. The user must have an identity card and he must be in voters list.
Voters Registration
The registration procedure of all the eligible voters .This registration process is done by the
administrator. According to voters database each voter is provided with a unique identification
codes which includes username and password.
The details of the voters include username, password, name, address, gender, constituency,
image etc.With the voter registration, thus producing the voter list with the given information of
the voters. The voter list can be viewed by anyone accessing the webpage. The admin can view
the voter list with in his homepage.
Candidate Registration
When the voter votes, the number of votes obtained by the selected candidate is incremented by
1.The result is published only after the voting process is over. It is accessible from the next day
after the termination date. Here we depict the result in the graphical representation according to
the percentage of vote obtained by the candidate. Result can be viewed by everyone who visits
into the site without any authentication problem. A link to view the result is kept in the index
page and both admin and voter can view the result in their respective homepages. When the user
clicks the “RESULT” link, before the termination date of the election,
“Result not Published yet” Message will be displayed. The result comes with their party symbol
on the top of the graph representing the percentage of vote obtained by each candidate.
Level-0
Fig 3.1:Level-0-DFD
Level-1
Election Master
Level-2
Admin
Election
Master
Fig 3.3.1:Level-2-DFD
Voter
Fig 3.3.2:Level-2-DFD
Admin
Candidate Name
Admin
Voter
Normalization
Normalization is the process of organizing data in a database. This includes creating
tables and establishing relationships between those tables according to rules designed both to
protect the data and to make the database more flexible by eliminating redundancy and
inconsistent dependency. Redundant data wastes disk space and creates maintenance problems
.If data that exists in more than
one place must be changed , the data must be changed in exactly the same way in all locations. A
buyer’s or promoter’s address change is much easier to implement if that data is stored only in
the buyer’s or promoter’s table and nowhere else in the database. There are a few rules for
database normalization. Each rule is called a “normal form
Data structuring is defined through a process called normalization. Data are grouped in
the simplest way possible so that later changes can be made with a minimum of impact on the
data structure.
TABLES
SYSTEM TESTING
AND
IMPLEMENTATION
Testing is the process of executing a program with the indent of finding any errors.
Testing is vital to the success of the system. Without proper testing hide errors will surface
after sometime of use and perhaps irreversible damage has been done to valuable data. A series
of tests like responsiveness, its value, stress and security are performed before the system
is ready for user acceptance testing. System testing follows the logical conclusion that is all
part of the system are tested and found to be working properly under all kinds of
situations, and then the system is achieving its goal of processing the data perfectly
according to user rules and requirements.The different types of testing are given below.
Unit testing
Validation testing
Output testing
User acceptance testing
It involves the basic testing of a piece of code, the size of which is often
undefined in practice. During the unit testing it is tested to know whether that
particular unit in the proper manner as expecting, if not appropriate modifications are
applied to get proper outputs
After performing the validation testing, next is the output testing of the proposed
system. The system cannot be useful if it not produce required output. The output
displayed by the system under consideration will be compared with the user needs. Here
the output format is considered in 2 ways, screen format and printed format. The o/p
It is the key for success of any system. The system under consideration is tested
for user acceptance by constantly keeping in touch with perspective system at the time
of development and making changes whenever required. This is done with regarding to
the input screen design and output screen design. Thus we have successfully done user
acceptance testing.
System implementation is the final phase that is putting the utility into action.
Implementation is the state in the project where theoretical design turned into working system.
The most crucial stage is achieving a new successful system and giving confidence in new
system that it will work efficiently and effectively. The system is implemented only after
thorough checking is done and it is found working according to the specifications.
System implementation is the final phase. i.e., putting the utility into action.
Implementation is the state in the project where theoretical design turned into working system.
The most crucial stage is achieving a new successful system and giving confidence in new
system that it will work efficiently and effectively. Implementation is the state in the
project where theoretical design turned into working system. The implementation stage is a
system project in its own right. It involves careful planning, design ,investigation of the
current system and constraints on implementation, design of methods to achieve change over
and evolution method. Once the planning has been completed the major effort is to ensure
that the programs in the system are working properly. At the same time concentrate on
training user staff.
4.2.1:Test plans
The implementation of a computer based system requires that the test data can be
prepared and the system and its elements be tested in a structured manner.
4.2.2:Training
The purpose of training is to ensure that all the personnel who are to be associated
with the computer based system possesses necessary knowledge skills.
4.2.3:Equipment installation
Equipment vendors can provide specifications for equipment installation. They usually
work with projects equipment installation team is planning for adequate space, power
and light, and a suitable environment. After a suitable site has been completed, the computer
equipment can be installed.
4.2.4:Conversion
It is the processes of performing all of the operations that result directly in turnover
of the new system to the user. Conversion has two parts:-
1. The creation of a conversion plan at the start of the development phase and the
implementation of the plan throughout the development phase.
2. The creation of a system change over plan at the end of the development phase
and the implementation of the plan at the beginning of operation phase.
CONCLUSION &
FUTURE ENHANCEMENTS
5.1 CONCLUSION
By doing this project we were able to bring a new system for online national
voting for our country. With the advent of technology and Internet in our day to day life, we
were able to offer advanced voting system to voters both in the country and outside through our
Online voting system.
The Online Voting System(OVS) platform can be made more secure by using the following
methods
Password Changing
Fingerprinting
Cornea Detection
The password used by the user to vote is provided by the
administrator. In the future the user can be given the privilege of changing the password. So it
helps to increase the security of the system. The other two methods that can be used are cornea
detection and fingerprinting. But here the problem is that it decreases the scope of the platform
because these systems need some electronic components to implement. So it will avoid the users
privilege to cast the votes at their fingertips. But it can guarantee that fake voting will be
impossible.
BIBLIOGRAPHY
BIBLIOGRAPHY
Herbert Schildt – Java 2: The Complete Reference, Fifth Edition. This book
covers all aspect of java programming language.
Educational Services Study Guide, Learn the basics of JAVA. Sun Micro
System’s publications.
www.mysql.com
www.w3schools.com
www.google.com
www.wikipaedia.com
www.eci.nic.in
APPENDIX -A
SCREENSHOTS
APPENDIX B
DBCONNECTION
package com;
import java.sql.*;
public class DBconnection
{
Connection con;
ResultSet rs=null;
public DBconnection()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost/kr","root","");
}
catch(Exception e)
{
System.out.println(e);
}
}
PreparedStatement ps3=con.prepareStatement("select
max(pkicandidateid) as pkicandidateid from candidatereg");
rs=ps3.executeQuery();
while(rs.next())
{
id=rs.getInt("pkicandidateid");
}
}
catch (Exception e)
{
System.out.println(e);
}
}
ps.setString(1,electionname);
ps.setInt(2,constituencyid);
ps.setString(3,terminationdate);
ps.executeUpdate();
ps1.setString(1,terminationdate);
ps1.executeUpdate();
}
catch(Exception e)
{
System.out.println(e);
}
}