ONLINE VOTING SYTEM MINI PROJECT 2019
INTRODUCTION
ONLINE VOTING SYTEM MINI PROJECT 2019
1.1 ABOUT THE PROJECT
India is a constitutional democracy with a parliamentary system of
government, and at the heart of the system is a commitment to hold
regular, free and fair elections. These elections determine the
composition of the government, the membership of the two houses of
parliament, the state and union territory legislative assemblies, and the
Presidency and vice-presidency. Elections are conducted according to
the constitutional provisions, supplemented by laws made by
Parliament.
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. 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 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
ONLINE VOTING SYTEM MINI PROJECT 2019
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.
ONLINE VOTING SYTEM MINI PROJECT 2019
SYSTEM ANALYSIS AND SPECIFICATIONS
ONLINE VOTING SYTEM MINI PROJECT 2019
2.1 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.
2.1.1 INITIAL INVESTIGATION
A detailed study of the process must be by various techniques
like interviews, questionnaires etc. The data collected by these sources
must be scrutinized to arrive to a conclusion. The conclusion is an
understanding of how the system functions. This system is called
existing system. Now the existing system is subjected to close study and
problem areas are identified. The designer now functions as a problem
solver and tries to sort out difficulties that the enterprise faces. The
solutions are given as proposals. The proposal is then weighed with the
existing system analytically and the best one is selected. The proposal is
presented to the user for an endorsement by the user .The proposal is
ONLINE VOTING SYTEM MINI PROJECT 2019
reviewed on user request and suitable changes are made. This is a loop
that ends as soon as the user is satisfied with proposal.
ONLINE VOTING SYTEM MINI PROJECT 2019
2.2 SYSTEM STUDY
2.2.1 EXISTING SYSTEM
In the present system there is no such application level
system provisions in the country to carry out the voting procedure as a
whole . Also in the present status, there is no such application in use for
automated system for voting according to the voting structure existing
in the country. All the step by step procedures are carried out by the
authorized authorities according to the jobs assigned by the ECI. The
fact is all the procedures are carried out manually, starting from the
registration process to result publishing.
To do this process, the government 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.
2.2.2 PROPOSED SYSTEM
The new implemented voting protocol has four main players:
The voter,candidate, administrator and counting sections. The voter can
register online giving his/her personal details.A unique alphanumeric
Election ID is generated automatically when the user registers
[Link] voter can further access his profile as well as exercise his
vote by logging in using his Election Id and [Link] voter can
cast only a single vote.
ONLINE VOTING SYTEM MINI PROJECT 2019
The candidate module allows each candidate to register as well using
his/her [Link] candidate can further login to verify his current
status by logging into the candidate portal using his email and password.
The administrator maintains an additional database containing the
details of all the citizens who are prospective voters or [Link]
admin performs the function of voter and candidate authorization and
validation by checking the registered details of the user against the
database maintained by the [Link] can thus view and maintain
the voter and candidate [Link] admin can change the current state
of the election procedure ie, initiate voting or counting of votes only
within the declared time on the notified election date.
The counting module is invoked only on termination of the
[Link] the election state is changed to ended,all the votes in
favour of a particular candidate are counted for each one of the
authorized [Link] candidate with the highest margin of votes is
declared the winner.
The main advantages of this project are:
1) Public transparency by the administrator (publication of Election
ID key, etc.).
2) Insured to technical troubles like interruption of access,
uncomplicated recovery etc.
3)Less wastage of time and human resources
Furthermore it is assumed that a trustworthy Administrator is available.
Apart from that, the accessibility to the public in the voting procedure
ONLINE VOTING SYTEM MINI PROJECT 2019
plays a special role, which means that the voting result can be
monitored, although casting of the votes has to be secret as a matter of
course.
2.2.3 MODULE DESCRIPTION
The proposed system consists of four modules,
Voter Module
Candidate Module
Administrator Module
Counting Module
VOTER MODULE
Voter interface consists of Election ID and unique password
using which he/she can login to the Online Voting System. This will be
supplied by the administrator to the user. Once the user is validated by
the administrator he has the privilege to view the names of the
candidates listed by the administrator once he is logged in.
For a new voter, “new voter” link is available for registration.A new
voter can register by giving in their name,gender,Date of birth,a valid
ID proof along with the unique identification number,email and
password.
Authentication & Voting
• Each voter is provided with unique Election ID and password by
the administrator. The voter uses the Election ID and password for
login and exercise the fundamental right of voting. If incorrect
ONLINE VOTING SYTEM MINI PROJECT 2019
Election ID or password is entered, the access is denied to the
voter. And also voter is allowed to vote only once. This is the
security feature provided against multiple access of the system by
the same voter.
• After login the voter enters the voter home [Link] the voter is
validated by the administrator,the voter is lead to a page where
candidate list is [Link] facilitates the voter to view the
candidate names and their party name along with selection buttons
to select the [Link] page also provides the following links :
Home
This link leads the voter to his/her home page.
Profile
The voter can update his/her profile here.
Logout
This provides an option for the voter to quit the session ,while in the
voter home page.
CANDIDATE MODULE
Candidate interface consists of Email ID and unique
password using which he/she can login to the Online Voting System.
Once the candidate is validated by the administrator he/she has the
privilege to contest in the election.
For a new candidate, “new candidate?” link is available for
registration.A new candidate can register by giving in their
ONLINE VOTING SYTEM MINI PROJECT 2019
name,party,gender,date of birth,ID proof along with its unique
identification number,email,phone and password.
Authentication & Voting
• The candidate uses his/her email ID and password for login and
viewing his contesting [Link] incorrect Email ID or password is
entered, the access is denied to the candidate.
• After login the candidate enters the candidate home [Link] the
candidate is validated by the administrator,an appropriate message
is [Link] page also provides the following links :
Home
This link leads the candidate to his/her home page.
Profile
The candidate can update his/her profile here.
Logout
This provides an option for the candidate to quit the session.
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.
Authenticate Candidate
Here the admin can authenticate the list of candidates in the
election. It includes candidate name, name,party,gender,date of birth,ID
ONLINE VOTING SYTEM MINI PROJECT 2019
proof along with its unique identification number,email,phone number.
The candidates will be added to the candidate list visible to the voter
only after completing the procedure of validation against the database of
all the prospective voters and candidates maintained by the [Link]
candidate cannot register after election procedure begins.
Authenticate Voter
Here the voters are authenticated and added to the voter database.
The voters details includes Election ID, name,gender,Date of birth,a
valid ID proof along with the unique identification number,email and
whether he/she has voted or not .
The administrator home page has the following links:
All Voters
Here we can view the voters list. The administrator can verify the
details provided by the voter for registration and then can aunthenticate
them thereby enabling them the right to exercise their voting right.
All Candidates
The list of candidates participating in the election can be seen.
An additional feature provided by the admin is the voting structure.
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 [Link]
starting and ending of the election are specified by the administrator.
ONLINE VOTING SYTEM MINI PROJECT 2019
COUNTING MODULE
When a voter votes, the candidate id in whose favour he/she voted
along with the voters election ID is stored in a separate [Link]
the voting process has ended, all the votes in favour of a particular
candidate are counted for each one of the authorized [Link]
candidate with the highest margin of votes is declared the winner.
The result is published only after the voting process is [Link] can
be viewed by everyone who visits into the site without any
authentication problem.
2.2.4 FEASIBILITY STUDY
Depending on the results of the initial investigation the survey is
now expanded to a more detailed feasibility study. Feasibilty study is a
test of system proposal according to its workability, impact of the
organization, ability to meet needs and effective use of the resources. It
focuses on these major questions:
1. What are the user’s demonstrable needs and how does a candidate
system meet them?
2. What resources are available for given candidate system?
3. What are the likely impacts of the candidate system on the
organization?
4. Whether it is worth to solve the problem?
During feasibility analysis for this project, following primary areas of
interest are to be [Link] and generating ideas about a
new system does this.
Steps in feasibility analysis:
Eight steps involved in the feasibility analysis are:
ONLINE VOTING SYTEM MINI PROJECT 2019
•Form a project team and appoint a project leader.
•Prepare system flowcharts.
•Enumerate potential proposed system.
•Define and identify characteristics of proposed system.
•Determine and evaluate performance and cost effective of each
proposed system.
•Weight system performance and cost data.
•Select the best-proposed system.
•Prepare and report final project directive to management.
Technical feasibility
A study of resource availability that may affect the ability to achieve an
acceptable system. This evaluation determines whether the technology
needed for the proposed system is available or not.
This is concerned with specifying equipment and software that will
successfully satisfy the user requirement. The technical needs of the
system may include:
Front-end and back-end selection
An important issue for the development of a project is the selection of
suitable front-end and back-end. When we decided to develop the
project we went through an extensive study to determine themost
suitable platform that suits the needs of the organization as well as helps
in development of the [Link] aspects of our study included the
following factors.
Front-end selection:
1. It must have a GUI that assists employees that are not from IT
background.
ONLINE VOTING SYTEM MINI PROJECT 2019
2. Scalability and extensibility.
3. Flexibility.
4. Robustness.
5. According to the organization requirement and the culture.
6. Must provide excellent reporting features with good printing support.
7. Platform independent.
8. Easy to debug and maintain.
9. Event driven programming facility.
Back-end Selection:
1. Multiple user support.
2. Efficient data handling.
3. Provide inherent features for security.
4. Efficient data retrieval and maintenance.
10. Easy to implant with the [Link] to above stated
features we selected MY SQL as the [Link] technical feasibility is
frequently the most difficult area encountered at this stage. It is essential
that the process of analysis and definition be conducted in parallel with
an assessment to technical feasibility. It centers on the existing
computer system and to what extent it can support the proposed system.
Economical feasibility
Economic justification is generally the “Bottom Line” consideration for
most systems. Economic justification includes a broad range of
concerns that includes cost benefit analysis. In this we weigh the cost
and the benefits associated with the candidate system and if it suits the
basic purpose of the organization i.e. profit making, the project is
making to the analysis and design [Link] financial and the economic
ONLINE VOTING SYTEM MINI PROJECT 2019
questions during the preliminary investigation are verified to estimate
the following:
•The cost to conduct a full system investigation.
•The cost of hardware and software for the class of application being
considered.
.
The benefits in the form of reduced cost.
•The proposed system will give the minute information, as a result the
performance is improved
•This feasibility checks whether the system can be developed with the
available funds.
Operational Feasibility
It is mainly related to human organizations and political aspects. The
points to be considered are:
•What changes will be brought with the system?
•What organization structures are disturbed?
•What new skills will be required? Do the existing staff members have
these skills? If not, can they be trained in due course of time?The
system is operationally feasible as it very easy for the End users to
operate it. It only needs basic information about Windows platform.
Schedule feasibility
Time evaluation is the most important consideration in the development
of project. The time schedule required for the developed of this project
is very important since more development time effect machine time,
cost and cause delay in the development of other systems.
ONLINE VOTING SYTEM MINI PROJECT 2019
REQUIREMENT
SPECIFICATION
ONLINE VOTING SYTEM MINI PROJECT 2019
3. 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.
3.1 HARDWARE REQUIREMENTS
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.
System : IBM-Compatible PC
Processor : Core i5
Speed : 2.0 GHz
Memory : 2 GB RAM
Hard Disk Drive : 500 GB
3.2 SOFTWARE REQUIREMENTS
Platform : Windows 10
Language used : J2EE
Back end : My SQL
Technologies used : JSP, JDBC
Designer tool : HTML
ONLINE VOTING SYTEM MINI PROJECT 2019
Server : Apache tomcat 8.0.57 To develop
application software, we use different types of software. The software
for the development has been selected based on several factors such as:
Support
Cost Effectiveness
Development Speed
Ability to create robust application least time
Stability
3.3 TOOLS AND ENVIRONMENT
3.3.1 WINDOWS 10
Windows 10 is a series of personal computer operating
systems produced by Microsoft as part of its Windows NT family of
operating systems. Most vendors load an operating system onto the hard
drive of a PC before delivering the PC. Enhanced Windows
10 security features allow businesses to keep their data, devices and
users protected 24x7. The OS makes it easier than ever for a small or
mid-sized business to get the Windows 10 benefits of enterprise-
grade security and control without complexity or unrealistic costs.
One of Windows 10's most notable features is support
for universal apps, an expansion of the Metro-style apps first introduced
in Windows 8. Universal apps can be designed to run across multiple
Microsoft product families with nearly identical code—
including PCs, tablets, smartphones, embedded systems, Xbox
One, Surface Hub and Mixed Reality.
Advantages:
ONLINE VOTING SYTEM MINI PROJECT 2019
Ease: Microsoft Windows has made much advancement and
changes which made it easy to use the operating system. Even though it
is not the easiest, it is easier than linux.
Software: Since there are more number of Microsoft users there
are more software programs, games and utilities for windows. All most
all games are compatible to windows, some CPU intensive and graphic
intensive games are also supported.
Hardware: All hardware manufacturers will support Microsoft
windows. Due to large number of Microsoft users and broader driver, all
the hardware devices are supported.
Front Page Extension: When using a popular web design program
having windows hosting makes it lot more easier. You don’t have to
worry if it supported or not.
Development: If you plan to develop windows based applications
then windows platform is most suggested as linux does not support
windows applications.
3.3.2. JAVA
Java is an object oriented, platform
independent programming language, which has become inseparably
linked with the online environment of the internet. Java had a
profound effect on the internet. The reason for this is quite simple.
Java expands the universe of objects that can move about freely in
cyberspace. Java achieves security by confining a java program to the
java execution environment and not allowing it access to other parts of
ONLINE VOTING SYTEM MINI PROJECT 2019
the computer. Java provides an elegant and efficient mechanism for
attaining portability.
The java virtual machine specification defines JVM as:
An imaginary machine that is implemented by emulating
it in software on a real machine. Code for the JVM is stored in the .class
files, each of which contains code for at most one public class. Its
represented as in fig1.
The java virtual machine specification provides the hardware
platform specifications to which we compile all java technology codes.
This software enables the Java software to be platform – independent
because the compilation is done for a generic machine, known as the
JVM.
Figure 1:Java Technology
ONLINE VOTING SYTEM MINI PROJECT 2019
3.3.3 JAVA SERVER PAGES
Java Server Pages technology is the Java platform technology for
building applications containing dynamic Web content such as HTML,
DHTML,, XHTML, XML. The Java Server Pages Technology enables
the authoring of web pages that create dynamic content easily but with
maximum power and flexibility. This technology lets you put snippets
of servlet code directly into a text based document.
The Java Server Pages technology offers a number of advantages
Write Once , Run Anywhere properties
High quality tool support
Reuse of components and tag libraries
Separation of dynamic and static content
Support for scripting actions
Web access layer for N-tier enterprise application architectures.
3.3.4 JAVA SERVELET TECHNOLOGY
Java servlet technology let us to define HTTP-specific servlet
classes. Servlet class extends the capabilities of servers that host
applications accessed by way of a request-response programming
model. Although servlet can respond to any type of request , they are
commonly used to extend the applications hosted by web servers.
ONLINE VOTING SYTEM MINI PROJECT 2019
Fig1. 3.2: Execution of Java Servlet
3.3.5 JAVASCRIPT
The JavaScript 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
3.3.6 HTML
It is a language used for the specification of structural markup. HTML
give the web authors the means to publish online documents with
ONLINE VOTING SYTEM MINI PROJECT 2019
headings,texts,tables,lists,photos,[Link] 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.
3.3.7 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.
Using JDBC, it is easy to send SQL statements to virtually any
relational database. One can write a single program using JDBC API,
and the program will be able to send SQL statements to the appropriate
database. The two tier jdbc model is as given below:
Fig: 3.3 The two-tier JDBC model
JDBC makes it possible to do three things as follows:
Establish a connection with database
Send SQL statements.
ONLINE VOTING SYTEM MINI PROJECT 2019
Process the results.
3.3.8 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.
Benefits of MySQL are as follows:
Easy to maintain & upgrade, does not have a slew of
administrative tasks to put up.
Its table format does not vary between releases
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
ONLINE VOTING SYTEM MINI PROJECT 2019
SYSTEM
DESIGN
ONLINE VOTING SYTEM MINI PROJECT 2019
[Link] DESIGN
System Design’s main aim is to identify the modules that should
be in the system, the specifications of these modules and how they
interact with each other to produce the desired results. At the end of
system design all the major data structures, file formats and the major
modules in the system and their specifications are [Link] most
creative and challenging phase of the system development process is
design phase, it is a solution, a “how to” approach to the creation of the
proposed system Design, the first step in the development of an
engineered product is initiated only after a clear exposition of expected
product functions becomes available. Based on the user requirements
and the detailed analysis of a new system, the new system must be
designed. This is the phase of system designing. Normally the design
proceeds in two stages: preliminary or general design, structure or
detailed design.
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
ONLINE VOTING SYTEM MINI PROJECT 2019
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:
Documentation: A good design always comes with a set of well-written
documents.
Testability: In a good design, every requirement is testable. A design
that cannot be easily tested against its requirements is not acceptable
design.
Structure: A good design presents hierarchical structure that makes
logical use of control policies among components.
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 appropriate abstraction and representation.
Reusability: a good design should be repeatable and reusable.
ONLINE VOTING SYTEM MINI PROJECT 2019
4.1 INPUT DESIGN
The input design is the link between the information system and the
user. It comprises the developing specification and procedures for data
preparation and those steps are necessary to put transaction data into a
usable form for processing can be achieved by inspecting the computer
to read data from a written or printed document or it can occur by
having people keying the data directly into the system. The design of
input focuses on controlling the amount of input required, controlling
the errors, avoiding delay, avoiding extra steps and keeping the process
simple. The input is designed in such a way so that it provides security
and ease of use with retaining the privacy. Input Design considered the
following things:
What data should be given as input?
How the data should be arranged or coded?
The dialog to guide the operating personnel in providing input.
Methods for preparing input validations and steps to follow when
error occur.
OBJECTIVES
1. Input Design is the process of converting a user-oriented description
of the input into a computer-based system. This design is important to
avoid errors in the data input process and show the correct direction to
ONLINE VOTING SYTEM MINI PROJECT 2019
the management for getting correct information from the computerized
system.
2. It is achieved by creating user-friendly screens for the data entry to
handle large volume of data. The goal of designing input is to make data
entry easier and to be free from errors. The data entry screen is designed
in such a way that all the data manipulates can be performed. It also
provides record viewing facilities.
3. When the data is entered it will check for its validity. Data can be
entered with the help of screens. Appropriate messages are provided as
when needed so that the user will not be in maize of instant. Thus the
objective of input design is to create an input layout that is easy to
follow
4.2 OUTPUT DESIGN
A quality output is one, which meets the requirements of the end user
and presents the information clearly. In any system results of processing
are communicated to the users and to other system through outputs. In
output design it is determined how the information is to be displaced for
immediate need and also the hard copy output. It is the most important
and direct source information to the user. Efficient and intelligent output
design improves the system’s relationship to help user decision-making.
1. Designing computer output should proceed in an organized, well
thought out manner; the right output must be developed while ensuring
that each output element is designed so that people will find the system
can use easily and effectively. When analysing and designing computer
ONLINE VOTING SYTEM MINI PROJECT 2019
output, they should identify the specific output that is needed to meet
the requirements.
2. Select methods for presenting information.
3. Create document, report, or other formats that contain information
produced by the system.
The output form of an information system should accomplish one or
more of the following objectives.
OBJECTIVES
Convey information about past activities, current status or
projections of the
Future.
Signal important events, opportunities, problems, or warnings.
Trigger an action.
Confirm an action.
4.3 DATA FLOW DIAGRAM
A data flow diagram (DFD) is a graphical representation of the
“flow” of data through an information system. A data flow diagram can
also be used for the visualization of data processing (structured design).
It is common practice for a designer to draw a context-level DFD first
which shows the interaction between the system and outside entities.
This context-level DFD is then “exploded” to show more details of the
system being modeled.
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)
ONLINE VOTING SYTEM MINI PROJECT 2019
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.
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
[Link] 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
ONLINE VOTING SYTEM MINI PROJECT 2019
“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 number,a 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 can be identified by a
horizontal line in the top left corner of the symbol. Each external entity
has the following: A Name (Noun) and a Description
DATA FLOW DIAGRAMS
ONLINE VOTING SYTEM MINI PROJECT 2019
Fig 3.1 to Fig 3.4.2 shows various levels of DFD’s in our project
entitled “Online Voting System”.
Fig 3.1:Level-0-DFD
Fig 3.2 .1: Level-1-DFD
ONLINE VOTING SYTEM MINI PROJECT 2019
Fig 3.2.1:Level-1-DFD of voter
Fig 3.2.2:Level-1-DFD of candidate
Fig 3.2.3:Level-1-DFD of admin
ONLINE VOTING SYTEM MINI PROJECT 2019
4.4 SYSTEM FLOW CHART
Fig 1:Flowchart-1 of voter
Fig 2:Flowchart-2 of voter
ONLINE VOTING SYTEM MINI PROJECT 2019
Fig 3:Flowchart-1 of candidate
Fig 4:Flowchart-2 of candidate
ONLINE VOTING SYTEM MINI PROJECT 2019
Fig 5:Flowchart of admin
4.5 STRUCTURE CHART
ONLINE VOTING SYTEM MINI PROJECT 2019
ONLINE VOTING SYTEM MINI PROJECT 2019
4.6 ENTITY RELATIONSHIP DIAGRAM
ONLINE VOTING SYTEM MINI PROJECT 2019
4.7 DATABASE DESIGN
A database system is an overall collection of different database
software components and database containing the parts viz. Database
application programs, front-end components, Database Management
Systems, and Databases.
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. 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.
There are different forms of normal forms
First normal form(1NF)
Second normal form(2NF)
Third normal form(3NF)
Boyce code normal form(BCNF)
Fourth Normal form(4NF)
ONLINE VOTING SYTEM MINI PROJECT 2019
Fifth Normal Form(5NF)
TABLES
Table 4.7.1 represents candidate
FIELD TYPE KEY
id int(10) Primary
name varchar(50)
phone varchar(40)
gender varchar(10)
dob varchar(20)
doc_proof varchar(40)
proof_no varchar(20)
email varchar(40)
party varchar(40)
approved varchar(40)
password varchar(50)
Table 4.7.2 represents Voter
FIELD TYPE KEY
voterid varchar(40) Primary
name varchar(50)
email varchar(50)
gender varchar(10)
dob varchar(20)
age int(11)
doc_proof varchar(40)
proof_no varchar(20)
ONLINE VOTING SYTEM MINI PROJECT 2019
password varchar(50)
voted varchar(20)
valid varchar(20)
Table 4.7.3 represents Vote
FIELD TYPE KEY
id int(40) Primary
candidate_id varchar(50)
voter_id varchar(50)
Table 4.7.4 represents votingstatus
FIELD TYPE KEY
votingstatus varchar(50) Primary
Table 4.7.5 represents elec_rolls
FIELD TYPE KEY
Name varchar(50)
Gender varchar(10)
Dob varchar(15)
doc_proof varchar(20) Primary
proof_no varchar(20) (Composite key)
Email varchar(40)
4.8 USECASE DIAGRAMS
ONLINE VOTING SYTEM MINI PROJECT 2019
The use case model for any system consists of a set of
“use cases”. Intuitively, use cases represent the different ways in which
a system can be used by the users. The use case corresponds to the high
level requirements .The use case do not mention any specific algorithm
to be used , nor the internal data representation ,internal structure of the
software , etc. A use case typically represents a sequence of interactions
between the user and the system .These interactions consists of one
main line sequence .The main line sequence represents the normal
interaction between the user and the system .Several variations to the
mainline sequence may also exist .Typically a variation from the
mainline sequence occur when some specific conditions are hold
Fig1: Admin Level Use Case Diagram
Text Description
ONLINE VOTING SYTEM MINI PROJECT 2019
U1: Validate Candidate:Using this use case,the admin can validate the
candidate by comparing the details provided by him/her during the
registration against the table of citizen details maintained by the admin,
thereby enabling him to contest in the election.
Scenario 1: Mainline sequence.
1. Admin:Select the ‘All Candidates’ option .
2. System:Displays the table containing details of all registered
candidates
3. Admin:Select the ‘Validate/Invalidate Candidate’ button
against the candidate who is to be validated
4. System:Check the details of the above candidate with the
details in the admin’s citizen [Link] details match,set the
‘valid’ field in candidate table as true and display the
message ‘Successfully updated’.
Scenario 2: At step 4 of the mainline sequence
[Link]:Check the details of the above candidate with the
details in the admin’s citizen [Link] details mismatch,set the
‘valid’ field in candidate table as false and display the
message ‘Successfully updated’.
U2: Validate Voter:Using this use case,the admin can validate the voter
by comparing the details provided by him/her during the registration
against the table of citizen details maintained by the admin, thereby
enabling him to vote in the election.
Scenario 1: Mainline sequence.
1. Admin:Select the ‘All Voters’ option .
2. System:Displays the table containing details of all registered
voters
3. Admin:Select the ‘Validate/Invalidate Voter’ button against
the voter who is to be validated
4. System:Check the details of the above voter with the details
in the admin’s citizen [Link] details match,set the ‘valid’
field in voter table as true and display the message
‘Successfully updated’.
Scenario 2: At step 4 of the mainline sequence
[Link]:Check the details of the above voter with the
details in the admin’s citizen [Link] details mismatch,set the
ONLINE VOTING SYTEM MINI PROJECT 2019
‘valid’ field in voter table as false and display the message
‘Successfully updated’
U3: Start and Stop Election: Using this use case ,the admin can start or
stop the election .
Scenario 1:Mainline sequence
1. Admin:Click on the toggling Start/End button
2. System :If the current time matches with the pre specified time of
the election, change voting status to START or END respectively.
Scenario 2:At step 2of the mainline sequence
[Link]: If the current time dose not match with the time of the
election, display message informing the admin about the election date
and time
Fig2:Candidate Level Use Case Diagram
Text Description
U1: Register :Using this use case diagram ,the candidate can register
himself/herself in the OVS as a prospective candidate giving his /her
details
Scenario 1: Mainline sequence
1. Candidate: Select ‘New Candidate’ link.
ONLINE VOTING SYTEM MINI PROJECT 2019
2. System: Displays the registeration form
3. Candidate:Fill in the respective fields and click Register
button
4. System: Displays the message ‘Successfully Registered’
Scenario 2: At step 4 of the mainline sequence
[Link]: Display alert that a field is not filled
Scenario 3: At step 4 of the mainline sequence
[Link]: Display alert that an unexpected data is entered in
the field
Scenario 4: At step 4 of the mainline sequence
[Link]: Display the message cannot register since election
started.
U2: View Status : Using this use case the candidate can view his status .
Scenario 1:Mainline sequence
1. Candidate: Select HOME link .
2. System: Display the candidate’s current status .
U3: Update Profile: Using this use case the candidate can update his/her
profile
Scenario 1:Mainline sequence
1. Candidate :Select PROFILE link
2. System:Display the Candidates editable Profile.
3. Candidate:Edit the profile and click on Update button.
4. System:Display message ’Successfully Updated’
Scenario 2:At step 4 of the mainline sequence
[Link]: Display alert that a field is not filled.
Scenario 3: At step 4 of the mainline sequence
[Link]: Display alert that an unexpected data is entered in
the field
ONLINE VOTING SYTEM MINI PROJECT 2019
Fig 3: Voter Level Use Case Diagram
Text Description
U1: Register :Using this use case diagram ,the Voter can register
himself/herself in the OVS as a prospective voter giving his /her details
Scenario 1: Mainline sequence
[Link]: Select ‘New Voter’ link.
[Link]: Displays the registeration form
[Link]:Fill in the respective fields and click Register button
[Link]: Displays the message ‘Successfully Registered’
Scenario 2: At step 4 of the mainline sequence
[Link]: Display alert that a field is not filled
Scenario 3: At step 4 of the mainline sequence
[Link]: Display alert that an unexpected data is entered in
the field
Scenario 4: At step 4 of the mainline sequence
[Link]: Display the message cannot register since age less than
18.
U2:Vote: Using this use case the voter can cast his vote.
Scenario 1:Mainline sequence
1. Voter: Select HOME link .
2. System: Display the voter’s current status .
Scenario 2:At step 2 of mainline sequence
ONLINE VOTING SYTEM MINI PROJECT 2019
[Link]: Display message VOTE HERE with table of validated
candidates .
[Link]: Select the prefered candidate and click the Vote button
[Link]: Display the current status
U3: View Status : Using this use case the voter can view his status .
Scenario 1:Mainline sequence
[Link]: Select HOME link .
[Link]: Display the voter’s current status .
U4: Update Profile: Using this use case the voter can update his/her
profile
Scenario 1:Mainline sequence
[Link] :Select PROFILE link
[Link]:Display the voter’s editable Profile.
[Link]:Edit the profile and click on Update button.
[Link]:Display message ’Successfully Updated’
Scenario 2:At step 4 of the mainline sequence
[Link]: Display alert that a field is not filled.
Scenario 3: At step 4 of the mainline sequence
[Link]: Display alert that an unexpected data is entered in
the field
Fig 4: Counting Level Use Case Diagram
Text Description
U1: Counting: Using this use case, the counting of votes is initiated
ONLINE VOTING SYTEM MINI PROJECT 2019
Scenario1: Mainline Sequence
1. Admin:Select VOTES link
2. System:Display the current status of the election process
3. Admin: Click on the END button
4. System: Change the voting status to END and count the total
votes of all the candidates and display the result
Scenario 2: at Step 1 of the mainline sequence
1. If the election time has expired , automatically change the
total votes of all candidates and display the result.
ONLINE VOTING SYTEM MINI PROJECT 2019
SYSTEM TESTING
ONLINE VOTING SYTEM MINI PROJECT 2019
[Link] TESTING
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 [Link] different
types of testing are given below.
5.1 TYPES OF TESTING
Unit testing
Validation testing
Output testing
User acceptance testing
5.1.1 UNIT 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
ONLINE VOTING SYTEM MINI PROJECT 2019
5.1.2 VALIDATION TESTING
At the conclusion of the black box testing, s/w is completely
assembled as a package. Interfacing errors have been uncovered
and correct and final series of test, ie validation begins. Validation
test van is defined with a simple definition that validation succeeds
when the software functions in a manner that can be reasonably
accepted by the customer. Thus we have successfully done
validation testing.
5.1.3 OUTPUT TESTING
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 format on the screen is found to be
correct as the format was defined in the design phase according to
user needs. As for the hardcopy the o/p comes according to the
specification requested by the user. Here the o/p testing does not
result in any correction in the system. Thus we have successfully
done output testing.
5.1.4 USER ACCEPTANCE TESTING
ONLINE VOTING SYTEM MINI PROJECT 2019
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.
ONLINE VOTING SYTEM MINI PROJECT 2019
IMPLEMENTATION
AND
MAINTENANCE
ONLINE VOTING SYTEM MINI PROJECT 2019
6.1 SYSTEM IMPLEMENTATION
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.
The major implementation procedures are:-
Test plans
Training
Equipment installation
Conversion
ONLINE VOTING SYTEM MINI PROJECT 2019
6.1.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.
6.1.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.
6.1.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.
6.1.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.
6.2 MAINTENANCE
ONLINE VOTING SYTEM MINI PROJECT 2019
In system maintenance, the most frequent changes requested
by the end user and the addition of information to report format .Error
detecting feature can be added to previous system from inadvertently
taking an unwanted action . Maintenance and quality assurance needs
can be better met with structured development and documentation tools
like structured flowchart
ONLINE VOTING SYTEM MINI PROJECT 2019
FUTURE ENHANCEMENTS
ONLINE VOTING SYTEM MINI PROJECT 2019
7. FUTURE ENHANCEMENTS
The Online Voting System(OVS) platform can be made more secure by
using the following methods:
Fingerprint
Biometric Authentication
Captcha code
Cornea Detection
Cornea detection , fingerprint and Biometric authentication can
guarantee that fake voting will be impossible. 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.
The OVS system can be used for different elections.
In this project we had done election for a single Loksabha constituency.
But this same system can be used in future for conducting different
elections like local body, legislative assembly, Loksabha elections for
many constituencies and wards. For eg: In Kerala there are more than
10000 panchayat wards. The whole election can be conducted using this
single platform. The only requirement is that we need to create the
whole voters database and enhance the system as a whole to
accommodate constituency details as well.
Results update through SMS.
In future we can add an SMS query also,
ie,we will get the result updates at the time of counting. To receive the
SMS we need to register with our mobile number in the [Link] can also
enhance the system by providing the additional feature of confirming
ONLINE VOTING SYTEM MINI PROJECT 2019
the vote cast by sending a confirmation message to the mobile number
being registered in the OVS system.
ONLINE VOTING SYTEM MINI PROJECT 2019
CONCLUSION
8. CONCLUSION
ONLINE VOTING SYTEM MINI PROJECT 2019
By doing this project we were able to bring a new system for
online voting in 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.
Top 4 Reasons to Move to the Online Voting Platform
1. Efficient and Cost Effective
The system offers significant cost benefits over paper [Link]
saves an organization the cost of creating, printing and postage,
since everything can be handled electronically. Online elections
reduce the use of paper and the amount of work for both the
organization, as well as voters.
2. Intelligent
The Online Voting Platform offers intelligent ballots, smart
checklist features, vote tallying, tabulation and reporting. These
functions are automatic and do not need to be assigned to
personnel in-house. Additionally, it allows administrators to create
rules on ballots so that voters cannot cast invalid votes, nor do
they need to be checked while counting.
3. Save Time and Resources
Online voting system drastically reduces the time required to set
up and conduct elections. There is no excess time required to
create paper ballots, set up paper ballots for printing, wait for the
printing to be completed, or wait for ballots to be filled out and
returned. Election results can also be calculated by this system
without consuming much time.
ONLINE VOTING SYTEM MINI PROJECT 2019
4. Easy and convenient
The Online Voting Platform offers the easiest and most convenient
method for administrators ,voters and candidates alike. For
administrators, the process of setting up a ballot and conducting an
election is simple and manageable.
The other advantages that the system offers are:
• Efficient data storage.
• Accuracy, real-time response and user friendliness.
• Intelligent Management
ONLINE VOTING SYTEM MINI PROJECT 2019
BIBLIOGRAPHY
9. BIBLIOGRAPHY
ONLINE VOTING SYTEM MINI PROJECT 2019
Pankaj Jalote. An Integrated Approach to Software Engineering ,
Third Edition, Narosa Publications.
A case study approach whereby a project is
Developed through the course of the book, illustrating different
activities of Software development
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.
Larne Pekowsky, Java Server Pages Covers 2.0,Second
Edition ,Pearson Education.-contains all the information necessary
to start writing JSP.
[Link]
[Link]
[Link]
[Link]
[Link]
ONLINE VOTING SYTEM MINI PROJECT 2019
APPENDIX -A
SCREENSHOTS
ONLINE VOTING SYTEM MINI PROJECT 2019
Screenshot 1:Index page
Screenshot 2:Voter Registration page
ONLINE VOTING SYTEM MINI PROJECT 2019
Screenshot 3:Voter Home page(Before voting)
Screenshot 4:Voter Profile page
ONLINE VOTING SYTEM MINI PROJECT 2019
Screenshot 5:Candidate Registration page
Screenshot 6:Candidate Login page
ONLINE VOTING SYTEM MINI PROJECT 2019
Screenshot 7:Candidate Home page
Screenshot 8:Candidate Profile page
ONLINE VOTING SYTEM MINI PROJECT 2019
Screenshot 9:Admin Login page
Screenshot 10:All voters List page
ONLINE VOTING SYTEM MINI PROJECT 2019
Screenshot 11:All candidates List page
Screenshot 12:Votes page in admin portal
ONLINE VOTING SYTEM MINI PROJECT 2019
APPENDIX B
ONLINE VOTING SYTEM MINI PROJECT 2019
SOURCE CODE
[Link]
package dbconnection;
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class Dbconnection {
Connection con=null;
public Dbconnection() throws ClassNotFoundException,
SQLException
{
[Link]("[Link]");
con=
[Link]("jdbc:mysql://localhost/election","root","
root");
[Link]("connected");
public ResultSet checkroll(String doc,String doc_no) throws
SQLException {
ResultSet r = null;
String str = "SELECT * FROM elec_rolls WHERE doc_proof=?
AND proof_no=?";
PreparedStatement st = [Link](str);
[Link](1, doc);
[Link](2, doc_no);
r = [Link]();
return r;
}
ONLINE VOTING SYTEM MINI PROJECT 2019
public boolean insertCandidate(String name,String party,String
phone,String email,String approved,String password,String
gender,String dob,String doc,String num) throws SQLException {
boolean b = false;
int a;
String str = "INSERT INTO
candidate(name,party,phone,email,approved,password,gender,dob,doc_
proof,proof_no) VALUES(?,?,?,?,?,?,?,?,?,?)";
PreparedStatement st = [Link](str);
[Link](1,name);
[Link](2,party);
[Link](3,phone);
[Link](4,email);
[Link](5,approved);
[Link](6,password);
[Link](7,gender);
[Link](8,dob);
[Link](9,doc);
[Link](10,num);
a = [Link]();
if(a>0) {
b = true;
}else {
b = false;
}
return b;
}
public boolean insertVoters(String voterId,String name,String
email,String password,String voted,String valid,String gender,String
dob,String age,String doc,String num) throws SQLException {
boolean b = false;
int a;
String str = "INSERT INTO
voters(voter_id,name,email,password,voted,valid,gender,dob,age,doc_p
roof,proof_no) VALUES(?,?,?,?,?,?,?,?,?,?,?)";
PreparedStatement st = [Link](str);
[Link](1,voterId);
[Link](2, name);
[Link](3, email);
ONLINE VOTING SYTEM MINI PROJECT 2019
[Link](4, password);
[Link](5, voted);
[Link](6, valid);
[Link](7, gender);
[Link](8, dob);
[Link](9, age);
[Link](10,doc);
[Link](11,num);
a = [Link]();
if(a>0) {
b = true;
}else {
b = false;
}
return b;
}
public ResultSet LoginCandidate(String email, String password)
throws SQLException {
ResultSet r = null;
String str = "SELECT * FROM candidate WHERE email = ?
AND password = ?";
PreparedStatement st = [Link](str);
[Link](1, email);
[Link](2, password);
r = [Link]();
return r;
}
public ResultSet Loginvoters(String elec_id, String password) throws
SQLException {
ResultSet r = null;
String str = "SELECT * FROM voters WHERE voter_id = ? AND
password = ?";
PreparedStatement st = [Link](str);
[Link](1, elec_id);
[Link](2, password);
r = [Link]();
return r;
}
ONLINE VOTING SYTEM MINI PROJECT 2019
public ResultSet getAllVoters() throws SQLException {
ResultSet r = null;
String str = "SELECT * FROM voters";
PreparedStatement st = [Link](str);
r = [Link]();
return r;
}
public ResultSet getAllCandidates() throws SQLException {
ResultSet r = null;
String str = "SELECT * FROM candidate";
PreparedStatement st = [Link](str);
r = [Link]();
return r;
}
public boolean ValidateVoter(String id,String status) throws
SQLException {
boolean b = false;
int a;
String str = "UPDATE voters SET valid = ? WHERE voter_id
=?";
PreparedStatement st = [Link](str);
[Link](1,status);
[Link](2, id);
a=[Link]();
if(a>0) {
b = true;
}else {
b = false;
}
return b;
}
public boolean approveCandidate(String id,String status) throws
SQLException {
boolean b = false;
int a;
String str = "UPDATE candidate SET approved = ? WHERE id
=?";
PreparedStatement st = [Link](str);
[Link](1,status);
ONLINE VOTING SYTEM MINI PROJECT 2019
[Link](2, id);
a=[Link]();
if(a>0) {
b = true;
}else {
b = false;
}
return b;
}
public String checkVoted(String id) throws SQLException {
String msg = null;
ResultSet r = null;
String str = "SELECT voted FROM voters WHERE voter_id = ?
AND valid = ?";
PreparedStatement st = [Link](str);
[Link](1, id);
[Link](2, "true");
r = [Link]();
if([Link]()) {
[Link]();
while([Link]()) {
if([Link](1).equals("false")) {
[Link]([Link](1));
msg = "proceed";
}else {
msg = "You have voted for a candidate!";
[Link]([Link](1) + "voted");
}
}
}else {
msg = "You are not Validated by Election Commission!!";
}
return msg;
}
public ResultSet CandidatesList() throws SQLException {
ResultSet r = null;
String str = "SELECT id,name,party FROM candidate WHERE
approved = ?";
ONLINE VOTING SYTEM MINI PROJECT 2019
PreparedStatement st = [Link](str);
[Link](1, "true");
r=[Link]();
return r;
}
public boolean votetoCandidate(String id,String v_id) throws
SQLException {
int a;
boolean b = false;
String str = "INSERT INTO vote(candidate_id,voter_id)
values(?,?)";
PreparedStatement st = [Link](str);
[Link](1, id);
[Link](2, v_id);
a = [Link]();
if(a>0) {
b = true;
}
return b;
}
public boolean updateVoted(String id) throws SQLException {
int a;
boolean b = false;
String str = "UPDATE voters SET voted = ? WHERE voter_id
= ?";
PreparedStatement st = [Link](str);
[Link](1, "true");
[Link](2, id);
a = [Link]();
[Link]("---"+id+"---");
if(a>0) {
b= true;
}
return b;
}
public String candidateStatus(String id) throws SQLException {
String s = null;
ResultSet r = null;
ONLINE VOTING SYTEM MINI PROJECT 2019
String str = "SELECT approved FROM candidate WHERE id
= ?";
PreparedStatement st = [Link](str);
[Link](1, id);
r = [Link]();
while([Link]()) {
if([Link](1).equals("true")) {
s = "You are approved by Election commission";
}else {
s = "Not approved by Election commission";
}
}
return s;
}
public int noOfVotes(String id) throws SQLException {
int i = 0;
ResultSet r = null;
String str = "SELECT COUNT(*) FROM vote WHERE
candidate_id = ?";
PreparedStatement st = [Link](str);
[Link](1, [Link](id));
r = [Link]();
while([Link]()) {
i = [Link]([Link](1));
}
return i;
}
public ResultSet getVoterById(String id) throws SQLException {
ResultSet r = null;
String str = "SELECT * FROM voters WHERE voter_id = ?";
PreparedStatement st = [Link](str);
[Link](1, id);
r = [Link]();
return r;
}
public boolean UpdateVoterInfo(String name,String email,String
password,String id,String age) throws SQLException {
boolean b = false;
int a;
ONLINE VOTING SYTEM MINI PROJECT 2019
String str = "UPDATE voters SET name =? ,email=?,password=?,
age=? WHERE voter_id = ?";
PreparedStatement st= [Link](str);
[Link](1, name);
[Link](2, email);
[Link](3, password);
[Link](4, age);
[Link](5, id);
a = [Link]();
[Link](st);
if(a>0) {
b =true;
}
return b;
}
public boolean UpdateCandidate(String name,String phone, String
email,String password,String id) throws SQLException {
boolean b = false;
int a;
String str = "UPDATE candidate SET name =?,phone
=? ,email=?,password=? WHERE id = ?";
PreparedStatement st= [Link](str);
[Link](1, name);
[Link](2, phone);
[Link](3, email);
[Link](4, password);
[Link](5, id);
a = [Link]();
if(a>0) {
b =true;
}
return b;
}
public ResultSet getCandidateById(String id) throws SQLException
{
ResultSet r = null;
String str = "SELECT * FROM candidate WHERE id = ?";
PreparedStatement st = [Link](str);
[Link](1, id);
ONLINE VOTING SYTEM MINI PROJECT 2019
r = [Link]();
return r;
}
public ResultSet getAllvotingStatus() throws SQLException {
ResultSet r = null;
String str = "SELECT DISTINCT (count(candidate_id)) as
totalvote,[Link] as name,[Link] as party FROM vote
INNER JOIN candidate on [Link] = vote.candidate_id GROUP by
candidate_id";
PreparedStatement st = [Link](str);
r = [Link]();
return r;
}
public boolean ToggleVoting(String status) throws SQLException {
boolean b = false;
int a;
String str = "UPDATE votingstatus SET votingstatus =?";
PreparedStatement st= [Link](str);
[Link](1, status);
a = [Link]();
if(a>0) {
b = true;
}
return b;
}
public ResultSet getVoteState() throws SQLException {
ResultSet r = null;
String str = "SELECT * FROM votingstatus";
PreparedStatement st = [Link](str);
r = [Link]();
return r;
}
public String getVoteStatetoString() throws SQLException {
ResultSet r = null;
String s =null;
String str = "SELECT * FROM votingstatus";
PreparedStatement st = [Link](str);
r = [Link]();
while([Link]()) {
ONLINE VOTING SYTEM MINI PROJECT 2019
s = [Link](1);
}
return s;
}
}
ONLINE VOTING SYTEM MINI PROJECT 2019
APPENDIX-3
ONLINE VOTING SYTEM MINI PROJECT 2019
GANTT CHART
Gantt Charts are mainly used to allocate resources to [Link]
resources allocated to activities include staff ,hardware and software.A
Gantt chart is a special type of bar chart where each bar represents an
[Link] bars are drawn along a [Link] length of each bar is
proportional to the duration of the time planned for the corresponding
activity.
[Link] Task Duration Start April May June July
name Date
1. Feasibility 6 April
study 20
2. Requirement 22 April
analysis 26
3. Requirement 9 May
specification 9
4. Design 10 May
Database 18
5. Design GUI 10 May
Part 18
6. Code DB 24 May
28
7. Code GUI 24 May
part 28
8. Testing 6 June
20
9. User Manual 74 May
Document 18