7/28/2019 Online Voting Report Final
1/30
Online Voting
CONTENTS
Chapter 1 Preamble pg.no
1.1 General Introduction 21.2 Statement of the problem 31.3 Objectives of the study 31.4 Scope of the problem 51.5 Methodology 61.6 Review of the structure 71.7 Limitations 10
Chapter 2 System Analysis
2.1 General description 112.2 Software requirement 122.3 Hardware requirement 12
Chapter 3 System Design
UML/Data flow/ER diagram 13
Chapter 4 Implementation
4.1 Coding details 144.2 Detail implementation 35
Chapter 5 Interpretation of results 36
Chapter 6 Testing 42Chapter 7 Conclusion 50
Bibliography 51
1
7/28/2019 Online Voting Report Final
2/30
Online Voting
Chapter 1
1. Preamble
1.1 General Introduction
Voting is a right of all the citizens. But sometimes it becomes very difficult
for the people who are on a move or out of the state or country to cast their vote.
Their votes simply go wasted or Proxy. At the same time they loose their
valuable right of voting. With electronic media replacing the manual ballet. Hence
we thought of developing a website which will be a solution to this problem. The
election commissioner will maintain or administrate this web. For all the places
that are undergoing voting, a database of the voters and candidates will be
maintained. Once a person cast his/her vote, with proper authentication the
revoting will be prohibited. Once the voting is over, all the counting will be done
online and result will be displayed.
This method of web voting can enhance the security and no proxy voting can bedone. Even with the Electronic voting machine, the booth capturing and forced
voting persists, but with Web voting tools such things are removed.
2
7/28/2019 Online Voting Report Final
3/30
Online Voting
1.2 Statement Of The Problem
The motto of the project is to build an enterprise site, which should be able
to allow people to cast their vote online. As voting is one of the premier right of a
citizens. A lot of security has to be maintained in order to achieve proper
functioning of the website. The website also tries to provide a testing tool to carry
out various levels of security and compatibility test on concept like online voting.
1.3 Objective of the study
The objectivity of the project is to design an enterprise site which allows
the NRIs to avail their voting right. But the Voting is one of the very important
rights of the Citizens of India. The misuse of this can lead to extreme severity.
Therefore any such solutions must come up with a lot of security issues. At the
same time the site must be a unique module to provide the election preparers to
prepare voters list contestant list and so on. At the same time it must also be an
integrated unit to display the result divided by areas or parties and by the votes.
The objectivities can be enlisted as bellow.
Code optimization is a very important concept towards the direction of an efficient
system.
Larger code means large compilation time. It drains up the servers
resources. Hence, It was one of the prior goals to optimize the coding as muchas possible.
1. Query Optimization: In the absences of content management system, it
would have required to write rather huge queries and structured procedure
3
7/28/2019 Online Voting Report Final
4/30
Online Voting
to achieve efficiency in the coding that was achieved. Therefore contains
management with full text search capabilities of SQL Server were
selected. It minimizes the query to a mere a single statement. This is
done by connecting all the format tables with the help of primary andforeign key pair.
2. Module Integrity: Through designing a PPC and Watchdog and auto
configs, the customer module were integrated with company module,
which removed the need for an extra admin module. The changes on the
ads made by the companies would automatically be reflected on the
customer pages.
3. History Optimization: the history was entirely made with structured
query, which minimizes to construct the date separately. The best thing
4. about it is, may a user click an ad 10 times a day but there would be only
one entry of that corresponding ad to the very day.
Display Optimization: Generally the result of search requires huge code blocks
but a custom intrinsic control of data list box containing link levels and panels.
Code efficiency is defined as success ratio of a desired output to a given input.The enterprise solution that is used over here is sent ionized into search, pay per
click module, watchdog timer.
Let us first discuss about the efficiency of the Search Module. The
module is designed with content management.
The watchdog is implemented along with the home page. It is here where
the customers last SQL Server 2000 is extracted and checked. It modifies the
balance of the company. If found it being zero, Company accounts are auto
deleted. This may cause unnecessary blockage of database files.
The user doesnt have to go through login process because the ad viewers
should not be protected by passwords as it should be seen by everybody.
4
7/28/2019 Online Voting Report Final
5/30
Online Voting
Hence unnecessary registration and login process is removed. It also eliminates
the need of maintaining user sessions.
1.4 Scope of the Project
The project is just a prototype of what the next generation voting solution
may look like. Many features couldn't have been implemented due to shortage in
testing-time. Hence we would like to conclude with a wish that many future
Developers take up the work initiated by us and gift the nation with a real - time
Online Voting solution. The project also provides neutral platform for testing with
following parameters.
The major case handlings are-
1. Client side validation
2. Server side validation
3. Database side validation
The major test cases are-
1. Unique key identification
2. State & Area validation3. User information validation
i. phone # validation
ii. e-mail validation
iii. .Address validation
4. Voter id identification
5. Voting date validation
6. Voting time validation
7. Multiple vote validation
8. Result validation
9. User information Update validation
10. ODBC data handling validation
5
7/28/2019 Online Voting Report Final
6/30
Online Voting
11. ODBC data modeling validation
12. Current location change validation
1.5 MethodologyThe project is a Servlet based implementation of the conceptual design.
The pages are build with the java and are hosted in either tomcat or servet
runner server
Unauthorized users cannot access any of the files because a servlet file invoked
only through the other. What ever pure HTML files are present using a file rader
all these files are read.these are made as different servlet programmes. The
major abstraction is achived in casting and result display. An election
commissioner imports the list of candidates seggrated by the area.whenever a
user loged in in his area statement is put in the session and if it is a voting date
only the candidates corresponding to the are are being displayedA watchdog
concept is also implemented which monitors whether the person has already
voted or notIf one has already voted,it counts the false votes tries and shootsup a legal message. The project also provides a prototype for displaying results
saggregated by the area,party,nationwise and statewise. A user can select any of
this.
6
7/28/2019 Online Voting Report Final
7/30
Online Voting
1.6 Review of literature.Net Framework 3.5
The main features of .Net Framework 3.5 are as below, which
prompted us to choose this platform to develop the application of this
complex nature.
Interoperability
Because computer systems commonly require interaction
between newer and older applications, the .NET Framework
provides means to access functionality implemented in newer
and older programs that execute outside the .NET environment.
Access to COM components is provided in the
System.Runtime.InteropServices and System.EnterpriseServices
namespaces of the framework; access to other functionality is
achieved using the P/Invoke feature.
Common Language Runtime engine
The Common Language Runtime (CLR) serves as the execution
engine of the .NET Framework. All .NET programs execute under
the supervision of the CLR, guaranteeing certain properties and
behaviors in the areas of memory management, security, and
exception handling.
Language independence
The .NET Framework introduces a Common Type System, or
CTS. The CTS specification defines all possible data types and
programming constructs supported by the CLR and how they
may or may not interact with each other conforming to
the Common Language Infrastructure (CLI) specification.
Because of this feature, the .NET Framework supports the
7
http://en.wikipedia.org/wiki/Component_Object_Modelhttp://en.wikipedia.org/wiki/Component_Object_Model7/28/2019 Online Voting Report Final
8/30
Online Voting
exchange of types and object instances between libraries and
applications written using any conforming .NET language.
Base Class Library
The Base Class Library (BCL), part of the Framework Class
Library (FCL), is a library of functionality available to all
languages using the .NET Framework. The BCL
provides classes that encapsulate a number of common
functions, including file reading and writing, graphic
rendering, database interaction, XML document manipulation,
and so on. It consists of classes, interfaces of reusable types
that integrates with CLR(Common Language Runtime).
Simplified deployment
The .NET Framework includes design features and tools which
help manage the installation of computer software to ensure it
does not interfere with previously installed software, and it
conforms to security requirements.
Security
The design addresses some of the vulnerabilities, such as buffer
overflows, which have been exploited by malicious software.
Additionally, .NET provides a common security model for all
applications.
Portability
While Microsoft has never implemented the full framework on
any system except Microsoft Windows, it has engineered the
framework to be platform-agnostic, [3] and cross-platform
implementations are available for other operating systems
(see Silverlight and the Alternative implementations section
8
http://en.wikipedia.org/wiki/.NET_Framework#cite_note-3http://en.wikipedia.org/wiki/.NET_Framework#cite_note-37/28/2019 Online Voting Report Final
9/30
7/28/2019 Online Voting Report Final
10/30
Online Voting
Extension methods in C# allow programmers to use static
methods as if they were methods from a class's method table,
allowing programmers to add methods to an object that they feel
should exist on that object and its derivatives. The type dynamic allows for run-time method binding, allowing
for JavaScript like method calls and run-time object composition.
C# has strongly typed and verbose function pointer support via
the keyword delegate .
Like the QT framework's pseudo-C++ signal and slot , C# has
semantics specifically surrounding publish-subscribe style events,
though C# uses delegates to do so. C# offers Java like syncronized method calls, via the
attribute [ MethodImpl ( MethodImplOptions .Synchronized ) , and has
support for mutually-exclusive locks via the keyword lock .
The C# languages does not allow for global variables or
functions. All methods and members must be declared within
classes. Static members of public classes can substitute for global
variables and functions. Local variables cannot shadow variables of the enclosing block,
unlike C and C++.
A C# namespace provides the same level of code isolation as a
Java package or a C++ namespace , with very similar rules and
features to a package .
C# supports a strict Boolean data type, bool . Statements that
take conditions, such as while and if , require an expression of a
type that implements the true operator, such as the boolean type.
While C++ also has a boolean type, it can be freely converted to
and from integers, and expressions such as if ( a ) require only
10
7/28/2019 Online Voting Report Final
11/30
Online Voting
that a is convertible to bool, allowing a to be an int, or a pointer.
C# disallows this "integer meaning true or false" approach, on the
grounds that forcing programmers to use expressions that return
exactly bool can prevent certain types of common programmingmistakes in C or C++ such as if (a = b) (use of
assignment = instead of equality == ).
In C#, memory address pointers can only be used within blocks
specifically marked as unsafe , and programs with unsafe code need
appropriate permissions to run. Most object access is done through
safe object references, which always either point to a "live" object
or have the well-defined null value; it is impossible to obtain areference to a "dead" object (one that has been garbage collected),
or to a random block of memory. An unsafe pointer can point to an
instance of a value-type, array, string, or a block of memory
allocated on a stack. Code that is not marked as unsafe can still
store and manipulate pointers through theSystem . IntPtr type, but it
cannot dereference them.
Managed memory cannot be explicitly freed; instead, it is
automatically garbage collected. Garbage collection addresses the
problem of memory leaks by freeing the programmer of
responsibility for releasing memory that is no longer needed.
In addition to the try ... catch construct to handle exceptions, C#
has a try ... finally construct to guarantee execution of the code in
the finally block, whether an exception occurs or not.
Multiple inheritance is not supported, although a class can
implement any number of interfaces. This was a design decision by
the language's lead architect to avoid complication and simplify
architectural requirements throughout CLI. When implementing
11
7/28/2019 Online Voting Report Final
12/30
Online Voting
multiple interfaces that contain a method with the same signature,
C# allows the programmer to implement each method depending
on which interface that method is being called through, or, like
Java, allows the programmer to implement the method once andhave that be the single invocation on a call through any of the
classes interfaces.
C#, unlike Java, supports operator overloading. Only the most
commonly overloaded operators in C++ may be overloaded in C#.
C# is more type safe than C++. The only implicit conversions by
default are those that are considered safe, such as widening of
integers. This is enforced at compile-time, during JIT, and, in some
cases, at runtime. No implicit conversions occur between booleans
and integers, nor between enumeration members and integers
(except for literal 0, which can be implicitly converted to any
enumerated type). Any user-defined conversion must be explicitly
marked as explicit or implicit, unlike C++ copy constructors and
conversion operators, which are both implicit by default.
C# has explicit support for covariance and contra variance,
unlike Java which as neither, and unlike C++ which has some
degree of support for contra variance simply through the semantics
of return types on virtual methods.
Enumeration members are placed in their own scope.
C# provides properties as syntactic sugar for a common pattern
in which a pair of methods, accessor (getter) and mutator
(setter)encapsulate operations on a single attribute of a class. No
redundant method signatures for the getter/setter implementations
need be written, and the property may be accessed using attribute
syntax rather than more verbose method calls.
12
7/28/2019 Online Voting Report Final
13/30
Online Voting
Checked exceptions are not present in C# (in contrast to Java).
This has been a conscious decision based on the issues of scalability
and versionability.
Though primarily an imperative language, since C# 3.0 itsupports functional programming techniques through first-class
function objects and lambda expressions.
SQL Server 2005SQL Server 2005 (formerly codenamed "Yukon") was released in October
2005. It included native support for managing XML data, in addition
to relational data. For this purpose, it defined an xml data type that could beused either as a data type in database columns or as literals in queries. XML
columns can be associated with XSD schemas; XML data being stored is
verified against the schema. XML is converted to an internal binary data type
before being stored in the database. Specialized indexing methods were
made available for XML data. XML data is queried using XQuery; SQL Server
2005 added some extensions to the T-SQL language to allow embedding
XQuery queries in T-SQL. In addition, it also defines a new extension to
XQuery, called XML DML, that allows query-based modifications to XML data.
SQL Server 2005 also allows a database server to be exposed over web
services using Tabular Data Stream(TDS) packets encapsulated within SOAP
(protocol) requests. When the data is accessed over web services, results are
returned as XML.
Common Language Runtime (CLR) integration was introduced with this
version, enabling one to write SQL code as Managed Code by the CLR. For
relational data, T-SQL has been augmented with error handling features
(try/catch) and support for recursive queries with CTEs (Common Table
Expressions). SQL Server 2005 has also been enhanced with new indexing
algorithms, syntax and better error recovery systems. Data pages are check
13
7/28/2019 Online Voting Report Final
14/30
Online Voting
summed for better error resiliency, and optimistic concurrency support has
been added for better performance. Permissions and access control have
been made more granular and the query processor handles concurrent
execution of queries in a more efficient way. Partitions on tables and indexesare supported natively, so scaling out a database onto a cluster is easier.
SQL CLR was introduced with SQL Server 2005 to let it integrate with the
.NET Framework.
SQL Server 2005 introduced "MARS" (Multiple Active Results Sets), a method
of allowing usage of database connections for multiple purposes.
SQL Server 2005 introduced DMVs (Dynamic Management Views), which are
specialized views and functions that return server state information that can
be used to monitor the health of a server instance, diagnose problems, and
tune performance.
Service Pack 1 (SP1) of SQL Server 2005 introduced Database Mirroring, a
high availability option that provides redundancy and failover capabilities at
the database level. Failover can be performed manually or can be configured
for automatic failover. Automatic failover requires a witness partner and an
operating mode of synchronous (also known as high-safety or full safety).
14
7/28/2019 Online Voting Report Final
15/30
Online Voting
1.7 Limitations of the Project
When HTML and the World Wide Web were first invented, the content of
each displayed page was essentially static. Each URL referred directly to either
a fixed page or a fixed element of a page. To allow for the possibility of more
interaction, and hence for pages that are tailored to an individual request, the
Web Form mechanism was introduced.
Web Form allows a URL to contain a basic reference, which is not to apage of HTML, but to a program. In addition to that basic reference, parameters
to control the execution can also be based from the browser into the SERVLET
program.
Although Web Form is quite simple to use, both from the users and the
server administrators point of view, it has a number of weaknesses:
Low performance
Startup time
Poor inter-Web Form communication
Security
A number of enhancements have been made to Web Form to address
these limitations.
15
7/28/2019 Online Voting Report Final
16/30
Online Voting
Chapter 2
System Analysis2.1 General Description
People have been voting since the ancient roman days. But from time to timethe architecture and the methods are been changing. As the technology has
evolved, the voting rules and the ways have also evolved. We have concepts like
voting machine and mobile voting. Even though the voting has been one of the
most premier rights of the citizens of the nations, the youth today do not seems
to be much interested to go for the long queues and cast their votes. The
software and other industrial challenges have not let people to go out and cast.
Therefore we have come up with a unique solution where by people can cast
their votes. As it demands a lot of security, we have tried to implement utmost
security and thus the system is a highly secured system. We have also shown a
way of abstraction by separating the election commissioners module with the
voter module. This also provides certain testing rules for the testing case
learners.
16
7/28/2019 Online Voting Report Final
17/30
Online Voting
System Requirements:
2.2 Hardware Requirements: System : Pentium IV 2.4 GHz.
Hard Disk : 40 GB.
Floppy Drive : 1.44 Mb.
Monitor : 15 VGA Colour.
Mouse : Logitech.
Ram : 512 Mb.
2.3 Software Requirements:
Operating system : - Windows XP.
Coding Language : ASP.Net with C#
Data Base : SQL Server 2005
17
7/28/2019 Online Voting Report Final
18/30
7/28/2019 Online Voting Report Final
19/30
Online Voting
CHAPTER 4 IMPLEMENTATION
4.1 CODING DETAILS
4.2 DETAIL IMPLEMENTATION
The major modules are enlisted as below
(1) LOGIN :-through login a user can log in to the voting site. His state and
area information is put in the session.
(2) REGISTRATION:-though registration a user can register himself to the
website.It checks if the user is already registered or not if one is registered
,it asks for a different username and password
(3) CASTING:- through this the user can cast his votes the overall vote count
of the candidate would be incremented by one and the users voting status
would b made true.This would allow the user to vote only if today is the
Voting day.
(4) RESULTS:-through results a user can observe the results either
(i)partywise National
(ii)The Nationwide result
19
7/28/2019 Online Voting Report Final
20/30
Online Voting
Chapter 5 SCREEN SHOTS
Chapter 6 Testing
SOFTWARE TESTING
What is testing?
The process of detecting & identifying defects, where a defect is any
variance between actual and expected results.
What is Software testing?
- Process of executing a program with the intent of finding errors.
- Confirming that a system performs its intended functions correctly.
- Establishing confidence that a system does what it is supposed to do.
Why Software testing?
To get adequate trust and confidence on the product. To meet the
organizational goals like meeting requirements satisfied customers, improved
market share, zero defects, etc.
Since the software can perform 100,000 correct operations per second, it
has the same ability to perform 100,000 wrong operations per second, if not
tested properly.
Approach to Software testing:
20
7/28/2019 Online Voting Report Final
21/30
Online Voting
Of varying impact (severity), of varying priority, etc. At different stages of
the development cycle. Using different types of testing.
3.1. Different categories of testing:1. White Box and Black box testing
2. Dynamic and Static testing
3. Manual and Automated Testing
4. Verification and Validation Techniques.
White Box Testing : The software tester has SQL Server 2000 to the
program/code and examines it for errors. Also called clear box testing or
structural testing. E.g.: Unit TestingBlack Box Testing : The software tester only knows what the system is
supposed to do, he does not know how it works internally. He has to test on
the basis of expected outputs. E.g: System Testing
Static Testing : Code is examined without being executed E.g: Code
inspections, Reviews, Walk-through.
Dynamic Testing : Code is executed and tested without, necessarily, being
examined. E.g: Black Box testing.
Manual Testing : Testing activities performed by people without the help of
software testing tools. E.g: Review, unit testing.
Automated Testing : Testing activities carried out with the help of software
testing tools. E.g: Regression Testing, Performance Testing
Verification
Verification : Is a set of activities carried out to see whether we are we
building the system right.
E.g: Set of white box testing activities
Testing Through Life Cycle:
21
7/28/2019 Online Voting Report Final
22/30
Online Voting
1. Requirement Analysis Testing
2. Design testing
3. Unit testing
4. Integration testing5. System testing.
a. Requirement Analysis Testing:
Objective : The objective of requirement analysis testing is to ensure
software quality by eradicating errors as earlier as possible in the
development process, as the errors noticed at the end of the software life
cycle are more costly compared to that of early ones, and there byvalidating each of the outputs.
The objective can be achieved by three basic issues:
Correctness
Completeness
Consistency
b. Design Testing
Objective : The objective of the design phase testing is to generate
complete specifications for implementing a system using a set of tools and
languages.
Design objective is fulfilled by five issues:
a) Consistency
b) Completeness
c) Correctness
d) Feasibility
22
7/28/2019 Online Voting Report Final
23/30
Online Voting
e) Traceability
c. Unit Testing
Objective: The main objective of unit testing is to ensure that the
individual units of a system work correctly in isolation, before they are
eventually integrated.
The objective can be achieved by the following issues:
a) Correctness
b) Completeness
c) Early testing
d) Debugging
d. Integration testing
Objective: Minimizing the errors which include internal and external interface
errors.
e. Software Testing
Objective: Software once validated for meeting functional requirements must beverified for proper interface with other system elements like hardware, databases
and people.
System testing verifies that all these system elements mesh properly and
the software achieves overall function/performance.
We carry out functionality testing, performance testing and other black box
testing to requirement as part of system testing.
Different Types of Testing:
- Reviews and walk-through
- Unit Testing
23
7/28/2019 Online Voting Report Final
24/30
Online Voting
- Integration testing
- Functional testing
- System testing
- Acceptance testing- Regression testing
- Usability testing
- Performance testing
- Security testing
Reviews: A group of persons (author need not be one among them) look for
errors, mistaken assumptions, lack of clarity and deviation from standard
practice. E.g.: Review of specifications, Project plans etc.
Walk-through: Similar to review and will be informal usually conducted by
the members of the group which will include the author. For E.g.: Improving
programming logic, Design approach etc.
Unit testing: Testing a single program, module, or unit of code. Validates that
the system performs as designed. Also called module testing or elements
testing.
Integration testing: Testing of related programs, modules, or units of code.
Validates that multiple parts of the system interact according to the system
design.
Functional testing: Functions are tested by feeding the input and examining
the output to the expected outputs. Functional tests are a type of black box
testing.
System Testing: Testing of entire system, can include functional and nonfunctional testing such as stress testing, validates the system as a whole.
24
7/28/2019 Online Voting Report Final
25/30
Online Voting
Acceptance Testing: Testing the system behavior against customers
requirements. Customers undertake typical tasks to check their requirements,
done at the customers premises on the user environment.
Regression testing: Selective retesting to detect faults introduced duringmodification of a system or system component to verify that modifications
have not caused unintended adverse effects. To verify that a modified system
or system component still meets its specific requirements.
Usability Testing: Evaluates the ease of using and learning the system and
system user documents by the end users. Evaluates the effectiveness of
system functioning in supporting user tasks and ability to recover from users
errors.
Performance Testing: Specifically aimed at verifying that the system meets
the specified performance requirements like response time, transactional
throughput-depends on the target values specified in the contract. Eg: 100
typical searches/min, 50 quotes/hour, 5 MB of files downloaded/sec etc,
number of concurrent users.
Security Testing: Verify how easily a system is subject to security violations
under different conditions and environments.
Some types of testing :
- Configuration Testing
- Installation Testing
- Load Testing
Software Testing Process/Steps:
1. Collect the documents from the project or from the leaders.
1. Writing the scripts.2. Running the test.
3. Bug tracking mechanism.
4. Test reports.
25
7/28/2019 Online Voting Report Final
26/30
7/28/2019 Online Voting Report Final
27/30
Online Voting
Testing All the projects are subjected to vigorous testing before they are actually
approved or accepted. The test cases that were considered for the project
were
i) User leaving a blank field: In all the forms validation controls are
used to ensure that no form is submitted without filling all the
respective fields. These controls are encoded client scripts
generated by the server. Whenever the user leaves a field blank
the form doesnt get submitted.
ii) All the pages are secured: all the pages were needed to provide
security. Hence all the pages are protected by sessions which are
generated at the time of log in. Hence a user can not access it
without log in.
27
7/28/2019 Online Voting Report Final
28/30
Online Voting
Chapter 7
ConclusionWe do not claim that we have done something special or new. At the end of the
day everything we try to develop is never new. Our emphasis has been to
provide a testing prototype and we have successfully done it. Providing security
through server side coding and providing optimum resource handling has been
something that we have achieved through our project. As we say that is a
prototype, a lot of work still to be carried out before it can be treated as a serious
solution for voting. We at our level have justified the work and provided valuable
model for testing. These rules are going to be of immense help for anybody who
would want to learn testing or implement testing rules. As the work has just
begin, it is hard to conclude at this point of time. But as a mandatory amendment
to the documentation, we have to conclude. We would conclude with a wish that
is work is identified by industrial gurus and is worked upon to create a real time
voting solution for our great nation. Even after producing millions of software
28
7/28/2019 Online Voting Report Final
29/30
Online Voting
developers, this country doesnt have an online voting system. May our work
motivate people to brush off this and motivates the youth to cast their vote and
take the country to the path of development.
Bibliography
1. Complete Reference Of .Net Framework:Herbert Schildt
2. A C# primer : E. Balguruswamy
3. COMPLETE .Net Certification : Simon Roberts
Philip Heller
Michael Ernest
4. ASP.Net programming : Jason Hunter
William Crawford
29
7/28/2019 Online Voting Report Final
30/30
Online Voting