Online Voting Report Final
Online Voting Report Final
Online Voting Report Final
Chapter 1
Preamble
1.1 General Introduction 1.2 Statement of the problem 1.3 Objectives of the study 1.4 Scope of the problem 1.5 Methodology 1.6 Review of the structure 1.7 Limitations
pg.no 2 3 3 5 6 7 10
Chapter 2
System Analysis
2.1 General description 2.2 Software requirement 2.3 Hardware requirement 11 12 12
Chapter 3
System Design
UML/Data flow/ER diagram 13
Chapter 4
Implementation
4.1 Coding details 4.2 Detail implementation 14 35 36 42 50 51
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 be done. Even with the Electronic voting machine, the booth capturing and forced voting persists, but with Web voting tools such things are removed.
Online Voting
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 and foreign 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. 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. The
Online Voting
Hence unnecessary registration and login process is removed. It also eliminates the need of maintaining user sessions.
Online Voting
11. ODBC data modeling validation 12. Current location change validation
1.5 Methodology
The 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 shoots up 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.
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 toCOM 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
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 functions, using the .NET Framework. a number and writing, The of BCL graphic provides classes that encapsulate common
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 and platform-agnostic,[3] and the Alternative cross-platform implementations are available for other operating systems (see Silverlight implementations section
Online Voting
below). Microsoft submitted the specifications for the Common Language Infrastructure(which language, and for third includes the the core class libraries, Common Type System, and the Common Intermediate Language), the C# makes it possible C++/CLI to create language to compatible both and the, making them available as official standards. This parties implementations of the framework and its languages on other platforms.
C#
By design, C# is the programming language that most directly reflects the underlying Common Language Infrastructure (CLI).Most of its intrinsic types correspond to value-types implemented by the CLI framework. However, the language specification does not state the code generation requirements of the compiler: that is, it does not state that a C# compiler must target a Common Language Runtime, or generate Common Intermediate Language (CIL), or generate any other specific format. Theoretically, a C# compiler could generate machine code like traditional compilers of C++ or Fortran. Some notable features of C# that distinguish it from C and C++ (and Java, where noted) are:
C# supports strongly typed implicit variable declarations with the keyword var, and implicitly typed arrays with the keyword new[]followed by a collection initializer.
Meta programming via C# attributes is part of the language. Many of these attributes duplicate the functionality of GCC's and VisualC++'s platform-dependent preprocessor directives. Like C++, and unlike Java, C# programmers must use the keyword virtual to allow methods to be overridden by subclasses.
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
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 programming mistakes in C or C++ such as if (a
= b) (use
of
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 a reference 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
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 and have 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
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 it supports functional programming techniques through first-class function objects and lambda expressions.
13
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 indexes are 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
Online Voting
Web Form allows a URL to contain a basic reference, which is not to a page 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
Online Voting
Chapter 2
System Analysis
2.1 General Description
People have been voting since the ancient roman days. But from time to time the 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
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
Online Voting
Chapter 3
System Design
Data Flow Diagram
Data Flow Diagram: Voter Id Name Password Address City Personal Information
Voting Election Commissioner
Voter
Results
18
Online Voting
CHAPTER 4
IMPLEMENTATION
19
Online Voting
Chapter 5
SCREEN SHOTS
Chapter 6
Testing
20
Online Voting
Of varying impact (severity), of varying priority, etc. At different stages of the development cycle. Using different types of 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
21
Online Voting
1. Requirement Analysis Testing 2. Design testing 3. Unit testing 4. Integration testing 5. 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 by validating 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
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 be verified 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.
23
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 non functional testing such as stress testing, validates the system as a whole.
24
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 during modification 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
25
Online Voting
a. Collect the documents from project leader: Documents about the company include, Design requirements 1. Its specification 2. Functional requirements 3. Functional specification b. Write The Scripts: The definition of scripts is to create the environment to run or execute the test cases. c. Running the Test: After these two processes step is to run the type of application tested d. Bug tracking mechanism: Bug tracking mechanism is one in which the bug /errors are traced. e. Test Reports: The test reports are the documents which are used for reporting the bugs or errors to the developer.
MANUAL TESTING
Manual testing is a testing activity performed by a test engineer without the help of software testing tools. Eg: reviews, unit testing. Manual testing is done by writing the test cases. Here, test case is defined as writing the sequence of messages. Manual tester writes the test cases. After a test case has been written for particular application then these test cases are executed. It consists of actual result, expected result and the respected status of the application. If that application is bug free then status is said to be passed. Else if any application then it should be understood that it should be tested again. Manual is done by the black box testing.
26
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
Online Voting
Chapter 7 Conclusion
We 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
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 3. COMPLETE .Net Certification : : E. Balguruswamy Simon Roberts Philip Heller Michael Ernest 4. ASP.Net programming : Jason Hunter William Crawford
29
Online Voting
30