A PROJECT REPORT
TO
DEPARTMENT OF INFORMATION TECHNOLOGY
INSTITUTE OF TECHNOLOGY,
GURU GHASIDAS VISHWAVIDYALAYA BILASPUR, INDIA
(CENTRAL UNIVERSITY)
SESSION: 2010- 2014
DECLARATION
CERTIFICATE
This is to certify that the project entitled Online Voting Portal
submitted by Pratiyush Ranjan (Roll No.:161021), Saurabh Kumar
(Roll No.:161011), Sourav Poddar (Roll No.:161018) under my
supervision at department of Information Technology, Institute of
Technology, Guru Ghasidas Vishwavidyalaya, Bilaspur.
To the best of my knowledge and belief the report
Embodies the work of the candidates themselves,
Has duly been completed,
Fulfills the requirement of the B.Tech degree of the University
___________________
(Signature of the Supervisor)
Name:
Designation:
______________
_____________
(Signature)
(Signature)
Examiner 1
Examiner 2
Name
Designation
Date:
Name
Designation
Date:
ACKNOWLEDGEMENT
This acknowledgement transcends the reality of formality when we would
like to express deep gratitude and respect to all those people behind the
screen who guided, inspired and helped us for the completion of our project
work.
We are grateful to our project guide Mr. Deepak Kant Netam for all the
help and guidance given for this project and for his dynamic leadership and
implementing the experience in this project.
We are highly obliged to Dr. Amit Khaskalam, (Head Of Department,
Information Technology, Institute of Technology, GGV, Bilaspur) for his
valuable suggestions and incredible support in providing all the facilities.
We also like to thank Mr. Santosh Soni, Mr. Agnivesh Pandey, Mr.
Pankaj Chandra, Mr. Abhishek Jain, Mr. Suhel Ahmed, Mr. Anand
Prakash Rawal and Ms. Akanksha Gupta who have continuously helped
and gave valuable suggestions to guide us in the successful completion of
the project work.
We are highly obliged to Prof. Shailendra Kumar, (Director, Institute of
Technology, GGV, Bilaspur) for his incredible support in providing all the
facilities.
We are very thankful to our friends for encourage and support during this
preparation of this project and whole course.
Our sincere thanks to our parents who were always there when we needed
them to give their moral support and help by all the ways which were
possible by them. As a result, this came into existence with their help.
PREFACE
Our project is user friendly Online Voting System which will encourage
more voters to shift to the online voting methodology. Increasing the voting
percentage across the country is the major goal of this project. People have
to visit the booth to cast their vote in the present system across the country.
Online Voting Portal is online and hence even people who live out of their
home town can also vote. This project report deals with the creation and
management of polling and election details. This is a system which enables
all citizens to cast their vote online. Database of all the eligible citizens and
candidates are maintained by the system. In order to prevent voter frauds we
have used some security levels which include a separate user and password
for every user.
This project report includes all the scopes which were taken into
consideration for the completion of Online voting system. The E-R Diagram,
Use Case Diagram, Sequence Diagrams and Data Flow Diagrams are used to
explain the internal working structure of the project. The various Snapshots
which are displayed in this report give the overall user viewpoint of the
website. This report includes the System Analysis which includes the
advantages of implementing Online Voting System on a wider platform. The
Future Enhancement of the online voting system gives an idea of all the
future scopes where we can successfully implement the online voting
system. This project Report also includes the source codes which were used
to frame the project into practicality.
Table of Contents
Chapter
1.
Title
Page No.
Introduction
Analysis
2.
3.
Previous Work
Design Approach
4.1 Introduction To Design
4.
5.
Testing
6.
Snapshots
7.
Source code
8.
Conclusion
9.
Future Enhancement
References
Chapter 1
INTRODUCTION
The aim of the project is to create and manage polling and election details.
This is a system which enables all citizens to cast their vote online. In order
to prevent voter frauds we have used some security levels. Increasing the
voting percentage across the country is the major goal of this project. People
have to visit the booth to cast their vote in the present system across the
country. This system is online and hence even people who live out of their
home town can also vote. Database of all the eligible citizens and candidates
are maintained by the system.
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 voters 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
Chapter 2
ANALYSIS
2.1 System Analysis
1. Existing System
Existing system is a manual one in which users and the details of the
candidates are stored in books .The users have to wait a long time in queues
for voting .Wrong and unwanted votes are given .counting of votes are done
manually which takes lots of time and inaccurate counting is done. It is very
difficult to maintain historical data.
DISADVANTAGES:
The following are the disadvantages of the existing system
Voters have to wait in a long queue for voting they have to travel long
distances.
8
2. Proposed System
The VOTING SOFTWARE is a software application which avoids more
manual hours that need to spend in record keeping and calculating votes.
Through this the users and the candidates are registered online. Their
information is stored in the database the admin can easily access the details
of the voters and the candidates The voters are allowed to vote online they
can even vote by sitting at home .Every User s allowed to vote only once so
there is no chance of duplicated votes. This application keeps the data in a
centralized way which is available to all the users simultaneously. It is very
easy to manage historical data in database. They can easily use the tool that
decreases manual hours spending for normal things and hence increases the
performance.
Hardware Requirements:
Pentium-IV(Processor).
Software Requirements:
Operating System :
Web-Technology:
ASP.NET 2.0
Front-End:
C#.NET
Back-End:
Windows 7
10
Chapter 3
PREVIOUS WORKS
E-voting through internet was first used for political elections in the
2000 in US.
Countries like Estonia and U.A.E have use internet voting nationwide.
NASA has also developed software for voting for the astronauts
aboard the International Space Station (ISS).
11
Chapter 4
DESIGN APPROACH
Use case:
A description of sequence of actions, including variants, that a system
performs that yields an observable result of value of an actor.
Details of Candidates
Details of Voters
Candidate
Details of votes
Calculation of Votes
Administrator
Vote
Voter
View Results
14
Database
Candidate
Voting System
Administrator
Voter
Registration
Generates unique Id
Registration
Generates unique Id
Stores the details of the voter and candidate
Vote
Vote
Vote
Calculate The Votes
Gives the results
Stores the results
Get the Results
Get the results
15
Registration
Unique Id Generated
Allowed ToLogin
Allowed To Vote
16
4.5
E-R Diagrams:
17
Chapter 5
TESTING
2.
3.
Testing Principles:
The primary objective for test case design is to derive a set of tests that has
the highest livelihood for uncovering defects in software. To accomplish this
objective two different categories of test case design techniques are used.
They are
White box testing.
Black box testing.
White-box testing:
White box testing focus on the program control structure. Test cases are
derived to ensure that all statements in the program have been executed at
least once during testing and that all logical conditions have been executed.
Block-box testing:
Black box testing is designed to validate functional requirements without
regard to the internal workings of a program. Black box testing mainly
19
20
Unit testing:
Unit testing is essential for the verification of the code produced during the
coding phase and hence the goal is to test the internal logic of the modules.
Using the detailed design description as a guide, important paths are tested
to uncover errors with in the boundary of the modules. These tests were
carried out during the programming stage itself. All units of Vienna SQL
were successfully tested.
Integration testing:
Integration testing focuses on unit tested modules and build the program
structure that is dictated by the design phase.
System testing:
System testing tests the integration of each module in the system. It also
tests to find discrepancies between the system and its original objective,
current specification and system documentation. The primary concern is the
compatibility of individual modules. Entire system is working properly or
not will be tested here, and specified path ODBC connection will correct or
not, and giving output or not are tested here these verifications and
validations are done by giving input values to the system and by comparing
with expected output. Top-down testing implementing here.
21
Acceptance Testing:
This testing is done to verify the readiness of the system for the
implementation. Acceptance testing begins when the system is complete. Its
purpose is to provide the end user with the confidence that the system is
ready for use. It involves planning and execution of functional tests,
performance tests and stress tests in order to demonstrate that the
implemented system satisfies its requirements.
Tools to special importance during acceptance testing include:
Test coverage Analyzer records the control paths followed for each test
case.
Timing Analyzer also called a profiler, reports the time spent in various
regions of the code are areas to concentrate on to improve system
performance.
Coding standards static analyzers and standard checkers are used to inspect
code for deviations from standards and guidelines.
Test Cases:
Test cases are derived to ensure that all statements in the program have been
executed at least once during testing and that all logical conditions have
been executed.
Using White-Box testing methods, the software engineer can drive test cases
that
22
Chapter 6
SNAPSHOTS
Home Screen:
Login choice:
23
Voter Login:
Voter Registration:
24
Voter Home:
Voter Polling:
25
Result Viewing:
Candidate Login:
26
Admin Home:
Forgot Password:
27
Chapter 7.
SOURCE CODE
Home Page coding:
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
28
Voter Login:
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;
while (dr.Read())
{
if (TextBox1.Text == dr.GetValue(0).ToString() & TextBox2.Text ==
dr.GetValue(1).ToString())
{
Response.Redirect("InvalidVote.aspx");
}
else
{
k = 1;
}
}
dr.Close();
if (k == 1)
{
string str = "insert into vote values('" + TextBox1.Text + "','" + TextBox2.Text +
"')";
29
}
}
Response.Redirect("Voterpolling.aspx");
Voter Registration:
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;
30
DropDownList1.SelectedItem.Text = DropDownList1.Items[0].Text;
TextBox12.Text = "";
TextBox13.Text = "";
DropDownList2.SelectedItem.Text = DropDownList2.Items[0].Text;
DropDownList3.SelectedItem.Text = DropDownList3.Items[0].Text;
TextBox15.Text = "";
}
Voter Polling:
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;
31
DropDownList1.DataBind();
string qry1 = "select Distinct(fname) from candidatereg";
SqlCommand cmd1 = new SqlCommand(qry1, con);
//SqlDataReader dr=cmd.ExecuteReader();
DataSet ds1 = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter(cmd1);
da1.Fill(ds1);
DropDownList2.DataSource = ds1;
DropDownList2.DataTextField = "fname";
DropDownList2.DataBind();
con.Close();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
int k=0;
con.Open();
int count = total_votes();
//Application["count"] = count;
32
con.Close();
}
////string s2 = "update polling set totalvotes=1+count where location=";
////Response.Redirect("RegAck.aspx");
}
public int total_votes()
{
int j=0;
SqlCommand cmd8 = new SqlCommand("select totalvotes from polling where
candidatename='"+DropDownList2.SelectedItem.Text+"'", con);
object d= cmd8.ExecuteScalar();
if (d != null)
{
i = int.Parse(d.ToString());
j = i + 1;
return j;
}
else
{
i = 0;
j = i + 1;
33
return j;
}}}
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;
Admin Home:
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
Admin Results:
34
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;
Forgot Password:
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;
35
dr = cmd.ExecuteReader();
if (dr.Read())
{
Label5.Text = dr[0].ToString();
}
else
{
Label5.Text = "try again";
}
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
}
TextBox2.Text = "";
Chapter 8
CONCLUSION
The package was designed in such a way that future modifications can be
done easily. The following conclusions can be deduced from the
development of the project.
features.
Chapter 9
FUTURE ENHANCEMENTS:
It is an easy way and an effective way for voting which allows the reduction
of travelling ,waiting in a long queues avoid unwanted votes and duplicated
votes, And we can get the accurate number of votes.
Well I and my team member have worked hard in order to present an
improved website better than the existing ones regarding the information
about the various activities. Still we found out that the project can be done in
a better way. Primarily, when we register we get an unique id by using that
unique id we allowed to login and allowed to vote .Each and every user are
37
allowed to vote only once nobody is allowed to vote more than once and
only the registered persons only can vote .The candidate also gets registered
by getting a unique id and he can compete from anywhere and can see the
results.
The next enhancement that we can add different kinds of buttons for easy
access and easy availability to each and every one in remote areas .These are
the enhancements that we could think of at present.
References
The following books were referred during the analysis and execution phase
of the project
MICROSOFT .NET WITH C#
Microsoft .net series
ASP .NET 2.0 PROFESSIONAL
Wrox Publishers
ASP .NET WITH C#
Apress Publications
C# COOK BOOK
38
reilly Publications
PROGRAMMING MICROSOFT ASP .NET 2.0 APPLICATION
Wrox Professional Guide
BEGINNING ASP .NET 2.0 E-COMMERCE IN C#
Novice to Professional.
WEBSITES:
WWW.GOOGLE.COM
WWW.ELECTIONCOMMISSION.NIC
39