Sie sind auf Seite 1von 98

1.

2 ABSTRACT

The word vote means to choose from a list, to elect or to determine truly representative of

country or state. Every citizen whose age is above 18 years is eligible voting. India is the second

most populated country in the world with nearly a fifth of the world's population and India has

world‘s largest youth populations. Though we have the much power and population still we are

facing threat like Delay in the disposal of election petitions, rigging of election and booth

capturing, Low polling percentage etc. This Project is developed for the threat free and user

oriented Online Voting System. The Online Voting system is made for the people of the country

residing around the world and wants to vote for their representative. The election can be

conducted in two ways the paper ballot election and the automated ballot elections. The

automated ballot elections are called the electronic voting. The online voting system is highly

developed and the online polling system can be replaced by accurately and directly voting online

and immediate results. The online voting system is done by the internet so it can be called the

Internet Voting.

2
1.3 INTRODUCTION TO ONLINE VOTING SYSTEM

―ONLINE VOTING SYSTEM‖ is an online voting technique. In this system people who
have citizenship of India and whose age is above 18 years of age and any sex can give his\her
vote online without going to any physical polling station. There is a database which is
maintained in which all the names of voters with complete information is stored.

In ―ONLINE VOTING SYSTEM‖ a voter can use his\her voting right online without any
difficulty. He\She has to be registered first for him/her to vote. Registration is mainly done by
the system administrator for security reasons. The system Administrator registers the voters on a
special site of the system visited by him only by simply filling a registration form to register
voter. Citizens seeking registration are expected to contact the system administrator to submit
their details. After the validity of them being citizens of India has been confirmed by the system
administrator by comparing their details submitted with those in existing databases such as those
as the Registrar of Persons, the citizen is then registered as a voter.

After registration, the voter is assigned a secret Voter ID with which he/she can use to log
into the system and enjoy services provided by the system such as voting. If invalid/wrong
details are submitted, then the citizen is not registered to vote.

1.3.1 BACKGROUND OF STUDY

The Online voting system (OVS) also known as e-voting is a term encompassing several
different types of voting embracing both electronic means of counting votes. Electronic voting
technology can include punched cards, optical scan voting systems and specialized voting kiosks
(including self contained direct-recording electronic voting systems or DRE). It can also involve
transmission of ballots and votes via telephones, private computer networks, or the internet.

Online voting is an electronic way of choosing leaders via a web driven application. The
advantage of online voting over the common ―queue method‖ is that the voters have the choice
of voting at their own free time and there is reduced congestion. It also minimizes on errors of
vote counting. The individual votes are submitted in a database which can be queried to find out
who of the aspirants for a given post has the highest number of votes.

3
This system is geared towards increasing the voting percentage in India since it has been
noted that with the old voting method {the Queue System}, the voter turnout has been a wanting
case. With system in place also, if high security is applied, cases of false votes shall be reduced.

With the ―ONLINE VOTING SYSTEM‖, a voter can use his\her voting right online
without any difficulty. He\She has to register as a voter first before being authorized to vote. The
registration should be done prior to the voting date to enable data update in the database.

However, not just anybody can vote. For one to participate in the elections, he/she must
have the requirements. For instance, he/she must be a registered citizen i.e. must be 18 and above
years old. As already stated, the project ‗Online Voting' provides means for fast and convenient
voting and access to this system is limited only to registered voters.

Internet voting systems are appealing for several reasons which include; People are
getting more used to work with computers to do all sorts of things, namely sensitive operations
such as shopping and home banking and they allow people to vote far from where they usually
live, helping to reduce absenteeism rate.

1.3.2 SIGNIFICANCE OF STUDY

The main purposes of OVS include:

 Provision of improved voting services to the voters through fast, timely and convenient
voting.

 Reduction of the costs incurred by the indian Electoral Commission during voting time in
paying the very many clerks employed for the sake of the success of the manual system.

 Check to ensure that the members who are registered are the only ones to vote. Cases of
―Dead People‖ voting are also minimized.

 Online voting system (OVS) will require being very precise or cost cutting to produce an
effective election management system.

 Therefore crucial points that this (OVS) emphasizes on are listed below.

i. Require less number of staff during the election.

4
ii. This system is a lot easier to independently moderate the elections and
subsequently reinforce its transparency and fairness.

iii. Less capital, less effort, and less labor intensive, as the primary cost and effort
will focus primarily on creating, managing, and running a secure online portal.

iv. Increased number of voters as individual will find it easier and more convenient
to vote, especially those abroad.

Objectives of the PROJECT

The specific objectives of the project include:

 Reviewing the existing/current voting process or approach in Kenya;

 Implementing a an automated/online voting system;

 Validating the system to ensure that only legible voters are allowed to vote.

Project justification

The ONLINE VOTING SYSTEM-INDIA shall reduce the time spend making long
queues at the polling stations during voting. It shall also enable the voters to vote from any part
of the globe as explained since this is an online application available on the internet. Cases of
vote miscounts shall also be solved since at the backend of this system resides a well developed
database using MS-SQL that can provide the correct data once it‘s correctly queried. Since the
voting process shall be open as early as possible, the voters shall have ample time to decide when
and whom to vote for.

SCOPE OF STUDY

It is focused on studying the existing system of voting in Kenya and to make sure that the
peoples vote is counts, for fairness in the elective positions. This is also will produce:

 Less effort and less labor intensive, as the primary cost and focus primary on creating,
managing, and running a secure web voting portal.

5
 Increasing number of voters as individuals will find it easier and more convenient to
vote, especially those abroad.

1.4 PROBLEM DEFINITION

Since the adoption of the Indian Constitution in 1950, 14 general elections and many
elections of various State Legislative Assemblies have been held. Although these elections were
generally free and fair, yet some weaknesses of our election system have been noticed. Some of
these weaknesses (challenges) are as under:

6
(a) Expensive elections:

In India, elections are very expensive and a common man, however, intelligent and honest he
may be, cannot fight elections. As a result only the rich people can fight elections and they make
use of political power first to serve their own interests. They also try to make more money
through illegal methods.

(b) Misuse of official machinery:

Though some steps have been taken by the Election Commission and the election laws to
check the misuse of official machinery during the elections, yet the ruling party makes use of
government servants, vehicles and discretionary grants to win the voters in their favour.

(C) Rigging of election and booth capturing:

With the connivance of the government officials, the ruling party tries to rig the elections.
Some candidates also capture the polling booths and make use of their muscle powers to do it. It
is alleged that in J&K Assembly elections held in 1987, many candidates of the opposition front
were declared losers even though they had got maximum number of votes

(d) Misuse of mass media:

During elections the ruling party uses various means of mass media-Radios, Television and
Newspapers etc.-to propagate their policies and programmers.

(e) Low polling percentage:

In India, many voters do not cast their votes. The voting percentage generally is almost 50 to
60 percent. Therefore, the representative bodies are not truly representative.

(f) Delay in the disposal of election petitions:

In India, it takes a long time in the disposal of election petitions and sometimes the very
purpose of election petition gets defeated.
7
CHAPTER 2

SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

The existing system is manual and the paper based voting which is voted on paper and
counted manually. The electronic tabulation brings new kind of voting system in which the
electronic cards with all candidates symbol is marked manually and this can be counted
electronically. The electronic voting systems are now different types known as the punch card,
mark sense and the digital pen voting systems.

The Electronic Ballot Marker makes the voter more easy to vote by providing the
selections on the display to vote present on the electronic machine.

The direct recording electronic voting machine is one which provides the display that can
be start when the voter touches the display consists of the mechanical and electro optical buttons,
software that accepts the vote and possesses a image or symbol on the display. The electronic
ballots are connected with the central ballot systems which directly accept and get the updated
record of all ballots. The central ballot system applies the Precinct count method which
calculates the all votes from the ballots present at polling centers. The results are immediate.

2.1.1 PROBLEMS WITH THE EXISTING VOTER REGISTRATION SYSTEM

The problems of the existing manual system of voting include among others the following:

1. Expensive and Time consuming: The process of collecting data and entering this data
into the database takes too much time and is expensive to conduct, for example, time and
money is spent in printing data capture forms, in preparing registration stations together
with human resources, and there after advertising the days set for registration process
including sensitizing voters on the need for registration, as well as time spent on entering
this data to the database.

2. Too much paper work: The process involves too much paper work and paper storage
which is difficult as papers become bulky with the population size.

8
3. Errors during data entry: Errors are part of all human beings; it is very unlikely for
humans to be 100 percent efficient in data entry.

4. Loss of registration forms: Some times, registration forms get lost after being filled in
with voters‘ details, in most cases these are difficult to follow-up and therefore many
remain unregistered even though they are voting age nationals and interested in
exercising their right to vote.

5. Short time provided to view the voter register: This is a very big problem since not all
people have free time during the given short period of time to check and update the voter
register.

6. Above all, a number of voters end up being locked out from voting.

2.2 PROPOSED SYSTEM

To overcome this problem we use a polling concept with advanced security with the help of
technology.

2.2.1 ADVANTAGE

The online voting system is for the citizens from all over India that consists of the data
and information

 Increased Polling rate.


 The database of the Voter‘s information and details
 Time saving.
 Voter‘s Id
 Calculation of total votes
 Checking information by the voter
 Remove wrong information
 The information immediately transfers to Election Commission.

9
2.3 USER INTERFACE REQUIREMENTS

2.3.1 FUNCTIONAL REQUIREMENTS

"A requirement specifies a function that a system or component must be able to perform."

Functional requirements specify specific behaviour or functions.

 Create a username entry box

 Create a password entry box

 Have a link enabled to connect to the help menu

 Help menu link will be required

 Voting link for the Administrator

 New Ballot creation link

 New Election Button

 Add choices for the answers or options to be chosen.

 Election ID will be displayed

 Submitted Vote Form display

2.3.2 NON FUNCTIONAL REQUIREMENTS

"A non-functional requirement is a statement of how a system must behave; it is a constraint

upon the systems behaviour."

 Network Resources needs to be reliable

 It must be reliable to process the database request

10
Usability

It is expected that the user should be able to vote easily online. Administration of the

page also should be user friendly. Provide step by step guide for both admin and users. User

should complete voting in a few minutes. Provide an online help. Provide also a quick guide for

users.

Reliability

The system should be reliable. Security is a major concern for an e-voting system.

Process used in this system should be secure enough to be able to meet the requirements

mentioned for e-voting. It requires database connections and network connections. Changes can

be done in the databases to store the votes. All changes needs to be confirmed and if the transfer

is complete the confirmation should be displayed. The changes should be monitored

Performance

There might be many users accessing to the web server simultaneously. As an online e-

voting tool performance shouldn‘t be affected much and response time for submitted page

should be less than a minute

Safety

Web server should be secure. Regular backups should be in place.

Security

Customer‘s voting is secure. Customer‘s registration information is confidential.

11
CHAPTER 3

DEVELOPMENT ENVIRONMENT

3.1 HARDWARE REQUIREMENT

RAM : 2GB

Processor : Intel i3 Processor

Hard Disk : 500 GB HDD

Monitor : 12‖ minimum needed

As this application can be accessed via internet, only web server is required as a hardware
interface to be able to run it. It is assumed that web server is in a secure environment with
necessary firewall and network setting done.

3.2 SOFTWARE REQUIREMENT

Operating System : Windows 7 / 8 / 10

Browsers : Google Chrome / Firefox / Opera / Safari

Language : C# and ASP.Net

Back End : Microsoft SQL server 2008

IDE USED : MS Visual Studio

IIS needs to be installed on the web server.

12
3.3 SOFTWARE DESCRIPTION

INTRODUCTION TO DOT NET

Microsoft.NET Framework

The .NET Framework is a new computing platform that simplifies application development in
the highly distributed environment of the Internet. The .NET Framework is designed to fulfill the
following objectives:

 To provide a consistent object-oriented programming environment whether object code is


stored and executed locally, executed locally but Internet-distributed, or executed
remotely.
 To provide a code-execution environment that minimizes software deployment and
versioning conflicts.
 To provide a code-execution environment that guarantees safe execution of code,
including code created by an unknown or semi-trusted third party.
 To provide a code-execution environment that eliminates the performance problems of
scripted or interpreted environments.
 To make the developer experience consistent across widely varying types of applications,
such as Windows-based applications and Web-based applications.
 To build all communication on industry standards to ensure that code based on the .NET
Framework can integrate with any other code.

The .NET Framework has two main components: the common language runtime and the .NET
Framework class library. The common language runtime is the foundation of the .NET
Framework. You can think of the runtime as an agent that manages code at execution time,
providing core services such as memory management, thread management, and remoting, while
also enforcing strict type safety and other forms of code accuracy that ensure security and
robustness. In fact, the concept of code management is a fundamental principle of the runtime.
Code that targets the runtime is known as managed code, while code that does not target the
runtime is known as unmanaged code. The class library, the other main component of the .NET

13
Framework, is a comprehensive, object-oriented collection of reusable types that you can use to
develop applications ranging from traditional command-line or graphical user interface (GUI)
applications to applications based on the latest innovations provided by ASP.NET, such as Web
Forms and XML Web services.

The .NET Framework can be hosted by unmanaged components that load the common language
runtime into their processes and initiate the execution of managed code, thereby creating a
software environment that can exploit both managed and unmanaged features. The .NET
Framework not only provides several runtime hosts, but also supports the development of third-
party runtime hosts.

For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for
managed code. ASP.NET works directly with the runtime to enable Web Forms applications and
XML Web services, both of which are discussed later in this topic.Internet Explorer is an
example of an unmanaged application that hosts the runtime (in the form of a MIME type
extension). Using Internet Explorer to host the runtime enables you to embed managed
components or Windows Forms controls in HTML documents. Hosting the runtime in this way
makes managed mobile code (similar to Microsoft® ActiveX® controls) possible, but with
significant improvements that only managed code can offer, such as semi-trusted execution and
secure isolated file storage.

The following illustration shows the relationship of the common language runtime and the class
library to your applications and to the overall system. The illustration also shows how managed
code operates within a larger architecture.

Features of the Common Language Runtime

The common language runtime manages memory, thread execution, code execution, code safety
verification, compilation, and other system services. These features are intrinsic to the managed
code that runs on the common language runtime.

14
With regards to security, managed components are awarded varying degrees of trust, depending
on a number of factors that include their origin (such as the Internet, enterprise network, or local
computer). This means that a managed component might or might not be able to perform file-
access operations, registry-access operations, or other sensitive functions, even if it is being used
in the same active application.

The runtime enforces code access security. For example, users can trust that an executable
embedded in a Web page can play an animation on screen or sing a song, but cannot access their
personal data, file system, or network. The security features of the runtime thus enable legitimate
Internet-deployed software to be exceptionally feature rich.

The runtime also enforces code robustness by implementing a strict type- and code-verification
infrastructure called the common type system (CTS). The CTS ensures that all managed code is
self-describing. The various Microsoft and third-party language compilers

Generate managed code that conforms to the CTS. This means that managed code can consume
other managed types and instances, while strictly enforcing type fidelity and type safety.

In addition, the managed environment of the runtime eliminates many common software issues.
For example, the runtime automatically handles object layout and manages references to objects,
releasing them when they are no longer being used. This automatic memory management
resolves the two most common application errors, memory leaks and invalid memory references.

The runtime also accelerates developer productivity. For example, programmers can write
applications in their development language of choice, yet take full advantage of the runtime, the
class library, and components written in other languages by other developers. Any compiler
vendor who chooses to target the runtime can do so. Language compilers that target the .NET
Framework make the features of the .NET Framework available to existing code written in that
language, greatly easing the migration process for existing applications.

15
While the runtime is designed for the software of the future, it also supports software of today
and yesterday. Interoperability between managed and unmanaged code enables developers to
continue to use necessary COM components and DLLs.

The runtime is designed to enhance performance. Although the common language runtime
provides many standard runtime services, managed code is never interpreted. A feature called
just-in-time (JIT) compiling enables all managed code to run in the native machine language of
the system on which it is executing. Meanwhile, the memory manager removes the possibilities
of fragmented memory and increases memory locality-of-reference to further increase
performance.

Finally, the runtime can be hosted by high-performance, server-side applications, such as


Microsoft® SQL Server™ and Internet Information Services (IIS). This infrastructure enables
you to use managed code to write your business logic, while still enjoying the superior
performance of the industry's best enterprise servers that support runtime hosting.

.NET Framework Class Library


The .NET Framework class library is a collection of reusable types that tightly integrate with the
common language runtime. The class library is object oriented, providing types from which your
own managed code can derive functionality. This not only makes the .NET Framework types
easy to use, but also reduces the time associated with learning newfeatures of the .NET
Framework. In addition, third-party components can integrate seamlessly with classes in the
.NET Framework.

For example, the .NET Framework collection classes implement a set of interfaces that you can
use to develop your own collection classes. Your collection classes will blend seamlessly with
the classes in the .NET Framework.

As you would expect from an object-oriented class library, the .NET Framework types enable
you to accomplish a range of common programming tasks, including tasks such as string
management, data collection, database connectivity, and file access. In addition to these common
tasks, the class library includes types that support a variety of specialized development scenarios.
16
For example, you can use the .NET Framework to develop the following types of applications
and services:

 Console applications.
 Scripted or hosted applications.
 Windows GUI applications (Windows Forms).
 ASP.NET applications.
 XML Web services.
 Windows services.

For example, the Windows Forms classes are a comprehensive set of reusable types that vastly
simplify Windows GUI development. If you write an ASP.NET Web Form application, you can
use the Web Forms classes.

Client Application Development

Client applications are the closest to a traditional style of application in Windows-based


programming. These are the types of applications that display windows or forms on the desktop,
enabling a user to perform a task. Client applications include applications such as word
processors and spreadsheets, as well as custom business applications such as data-entry tools,
reporting tools, and so on. Client applications usually employ windows, menus, buttons, and
other GUI elements, and they likely access local resources such as the file system and peripherals
such as printers.

Another kind of client application is the traditional ActiveX control (now replaced by the
managed Windows Forms control) deployed over the Internet as a Web page. This application is
much like other client applications: it is executed natively, has access to local resources, and
includes graphical elements.

In the past, developers created such applications using C/C++ in conjunction with the Microsoft
Foundation Classes (MFC) or with a rapid application development (RAD) environment such as
Microsoft® Visual Basic®. The .NET Framework incorporates aspects of these existing products

17
into a single, consistent development environment that drastically simplifies the development of
client applications.

The Windows Forms classes contained in the .NET Framework are designed to be used for GUI
development. You can easily create command windows, buttons, menus, toolbars, and other
screen elements with the flexibility necessary to accommodate shifting business needs.

For example, the .NET Framework provides simple properties to adjust visual attributes
associated with forms. In some cases the underlying operating system does not support changing
these attributes directly, and in these cases the .NET Framework automatically recreates the
forms. This is one of many ways in which the .NET Framework integrates the developer
interface, making coding simpler and more consistent.

Unlike ActiveX controls, Windows Forms controls have semi-trusted access to a user's
computer. This means that binary or natively executing code can access some of the resources on
the user's system (such as GUI elements and limited file access) without being able to access or
compromise other resources. Because of code access security, many applications that once
needed to be installed on a user's system can now be safely deployed through the Web. Your
applications can implement the features of a local application while being deployed like a Web
page.

C#.Net for Windows Application


Overview of the .NET Framework

The .NET Framework is a managed type-safe environment for application development and
execution. The .NET Framework manages all aspects of your program‘s execution. It allocates
memory for the storage of data and instructions, grants or denies the appropriate permissions to
your application, initiates and manages application execution, and manages the reallocation of
memory from resources that are no longer needed. The .NET Framework consists of two main
components: the common language runtime and the .NET Framework class library.

18
The common language runtime can be thought of as the environment that manages code
execution. It provides core services, such as code compilation, memory allocation, thread
management, and garbage collection. Through the common type system (CTS), it enforces strict
type-safety and ensures that code is executed in a safe environment by also enforcing code
access security.

The .NET Framework class library provides a collection of useful and reusable types that are
designed to integrate with the common language runtime. The types provided by the .NET
Framework are object-oriented and fully extensible, and they allow you to seamlessly integrate
your applications with the .NET Framework.

Languages and the .NET Framework

The .NET Framework is designed for cross-language compatibility, which means, simply, that
.NET components can interact with each other no matter what supported language they were
written in originally. So, an application written in Microsoft Visual Basic .NET might reference
a dynamic-link library (DLL) file written in Microsoft Visual C#, which in turn might access a
resource written in managed Microsoft Visual C++ or any other .NET language. This language
interoperability extends to full object-oriented inheritance. A Visual Basic .NET class might be
derived from a C# class, for example, or vice versa.

This level of cross-language compatibility is possible because of the common language runtime.
When a .NET application is compiled, it is converted from the language in which it was written
(Visual Basic .NET, C#, or any other .NET-compliant language) to Microsoft Intermediate
Language (MSIL or IL). MSIL is a low-level language that the common language runtime can
read and understand. Because all .NET executables and DLLs exist as MSIL, they can freely
interoperate. The Common Language Specification (CLS) defines the minimum standards to
which .NET language compilers must conform. Thus, the CLS ensures that any source code
successfully compiled by a .NET compiler can interoperate with the .NET Framework.

The CTS ensures type compatibility between .NET components. Because .NET applications are
converted to IL prior to deployment and execution, all primitive data types are represented as

19
.NET types. Thus, a Visual Basic Integer and a C# int are both represented in IL code as a
System.Int32. Because both languages use a common type system, it is possible to transfer data
between components and avoid time-consuming conversions or hard-to-find errors.

Visual Studio .NET ships with languages such as Visual Basic .NET, Visual C#, and Visual C++
with managed extensions, as well as the JScript scripting language. You can also write managed
code for the .NET Framework in other languages. Third-party tools and compilers exist for
Fortran, Cobol, Perl, and a host of other languages. All of these languages share the same cross-
language compatibility and inheritability. Thus, you can write code for the .NET Framework in
the language of your choice, and it will be able to interact with code written for the .NET
Framework in any other language.

.NET Framework Architecture

The Structure of a .NET Application

To understand how the common language runtime manages code execution, you must examine
the structure of a .NET application. The primary unit of a .NET application is the assembly. An
20
assembly is a self-describing collection of code, resources, and metadata. The assembly manifest
contains information about what is contained within the assembly. The assembly manifest
provides:

 Identity information, such as the assembly‘s name and version number


 A list of all types exposed by the assembly
 A list of other assemblies required by the assembly
 A list of code access security instructions, including permissions required by the
assembly and permissions to be denied the assembly

Each assembly has one and only one assembly manifest, and it contains all the description
information for the assembly. However, the assembly manifest can be contained in its own file or
within one of the assembly‘s modules.

An assembly contains one or more modules. A module contains the code that makes up your
application or library, and it contains metadata that describes that code. When you compile a
project into an assembly, your code is converted from high-level code to IL. Because all
managed code is first converted to IL code, applications written in different languages can easily
interact. For example, one developer might write an application in Visual C# that accesses a
DLL in Visual Basic .NET. Both resources will be converted to IL modules before being
executed, thus avoiding any language-incompatibility issues.

Each module also contains a number of types. Types are templates that describe a set of data
encapsulation and functionality. There are two kinds of types: reference types (classes) and value
types (structures). These types are discussed in greater detail in Lesson 2 of this chapter. Each
type is described to the common language runtime in the assembly manifest. A type can contain
fields, properties, and methods, each of which should be related to a common functionality. For
example, you might have a class that represents a bank account. It contains fields, properties, and
methods related to the functions needed to implement a bank account. A field represents storage
of a particular type of data. One field might store the name of an account holder, for example.
Properties are similar to fields, but properties usually provide some kind of validationwhen data
is set or retrieved. You might have a property that represents an account balance. When an
21
attempt is made to change the value, the property can check to see if the attempted change is
greater than a predetermined limit. If the value is greater than the limit, the property does not
allow the change. Methods represent behavior, such as actions taken on data stored within the
class or changes to the user interface. Continuing with the bank account example, you might
have a Transfer method that transfers a balance from a checking account to a savings account, or
an Alert method that warns users when their balances fall below a predetermined level.

CLR Execution Model

Compilation and Execution of a .NET Application

When you compile a .NET application, it is not compiled to binary machine code; rather, it is
converted to IL. This is the form that your deployed application takes—one or more assemblies
consisting of executable files and DLL files in IL form. At least one of these assemblies will
contain an executable file that has been designated as the entry point for the application.

22
When execution of your program begins, the first assembly is loaded into memory. At this point,
the common language runtime examines the assembly manifest and determines the requirements
to run the program. It examines security permissions requested by the assembly and compares
them with the system‘s security policy. If the system‘s security policy does not allow the
requested permissions, the application will not run. If the application passes the system‘s security
policy, the common language runtime executes the code. It creates a process for the application
to run in and begins application execution. When execution starts, the first bit of code that needs
to be executed is loaded into memory and compiled into native binary code from IL by the
common language runtime‘s Just-In-Time (JIT) compiler. Once compiled, the code is executed
and stored in memory as native code. Thus, each portion of code is compiled only once when an
application executes. Whenever program execution branches to code that has not yet run, the JIT
compiler compiles it ahead of execution and stores it in memory as binary code. This way,
application performance is maximized because only the parts of a program that are executed are
compiled.

2: The .NET Base Class Library

 The .NET base class library is a collection of object-oriented types and interfaces that
provide object models and services for many of the complex programming tasks you will
face. Most of the types presented by the .NET base class library are fully extensible,
allowing you to build types that incorporate your own functionality into your managed
code.

The .NET Framework base class library contains the base classes that provide many of the
services and objects you need when writing your applications. The class library is organized into
namespaces. A namespace is a logical grouping of types that perform related functions. For
example, the System.Windows.Forms namespace contains all the types that make up Windows
forms and the controls used in those forms.

Namespaces are logical groupings of related classes. The namespaces in the .NET base class
library are organized hierarchically. The root of the .NET Framework is the System namespace.

23
Other namespaces can be accessed with the period operator. A typical namespace construction
appears as follows:

System
System.Data
System.Data.SQLClient

The first example refers to the System namespace. The second refers to the System.Data
namespace. The third example refers to the System.Data.SQLClient namespace. Table 1.1
introduces some of the more commonly used .NET base class namespaces.

Table 1-1.Representative .NET Namespaces

Namespace Description
This namespace is the root for many of the low-level types required
by the .NET Framework. It is the root for primitive data types as well,
System
and it is the root for all the other namespaces in the .NET base class
library.
This namespace contains classes that represent a variety of different
container types, such as ArrayList, SortedList, Queue, and Stack. You
System.Collections
also can find abstract classes, such as CollectionBase, which are
useful for implementing your own collection functionality.
This namespace contains classes involved in component creation and
System.ComponentModel
containment, such as attributes, type converters, and license providers.
This namespace contains classes required for database access and
System.Data
manipulations, as well as additional namespaces used for data access.
This namespace contains a set of classes that are shared by the .NET
System.Data.Common
managed data providers.
System.Data.OleDb This namespace contains classes that make up the managed data

24
Table 1-1.Representative .NET Namespaces

Namespace Description
provider for OLE DB data access.
This namespace contains classes that are optimized for interacting
System.Data.SQLClient
with Microsoft SQL Server.
This namespace exposes GDI+ functionality and provides classes that
System.Drawing
facilitate graphics rendering.
System.IO In this namespace, you will find types for handling file system I/O.
This namespace is home to common mathematics functions such as
System.Math
extracting roots and trigonometry.
This namespace provides support for obtaining information and
System.Reflection
dynamic creation of types at runtime.
This namespace is home to types dealing with permissions,
System.Security
cryptography, and code access security.
This namespace contains classes that facilitate the implementation of
System.Threading
multithreaded applications.
This namespace contains types involved in creating standard
System.Windows.Forms Windows applications. Classes that represent forms and controls
reside here as well.

The namespace names are self-descriptive by design. Straightforward names make the .NET
Framework easy to use and allow you to rapidly familiarize yourself with its contents.

Reference Types and Value Types

Types in the .NET Framework come in two varieties: value types and reference types. The
primary difference between value types and reference types has to do with the way variable data
is accessed. To understand this difference, a little background on memory dynamics is required.

25
Application data memory is divided into two primary components, the stack and the heap. The
stack is an area of memory reserved by the application to run the program. The stack is
analogous to a stack of dinner plates. Plates are placed on the stack one on top of another. When
a plate is removed from the stack, it is always the last one to have been placed on top that is
removed first. So it is with program variables. When a function is called, all the variables used
by the function are pushed onto the stack. If that function calls additional functions, it pushes
additional variables onto the stack. When the most recently called function terminates, all of its
variables go out of scope (meaning that they are no longer available to the application) and are
popped off the stack. Memory consumed by those variables is then freed up, and program
execution continues.

The heap, on the other hand, is a separate area of memory reserved for the creation of reusable
objects. The common language runtime manages allocation of heap memory for objects and
controls the reclamation of memory from unused objects through garbage collection.

All the data associated with a value type is allocated on the stack. When a variable of a value
type goes out of scope, it is destroyed and its memory is reclaimed. A variable of a reference
type, on the other hand, exists in two memory locations. The actual object data is allocated on the
heap. A variable containing a pointer to that object is allocated on the stack. When that variable
is called by a function, it returns the memory address for the object to which it refers. When that
variable goes out of scope, the object reference is destroyed but the object itself is not. If any
other references to that object exist, the object remains intact. If the object is left without any
references, it is subject to garbage collection. (See Lesson 6 of this chapter.)

Examples of value types include primitives, such as Integer (int), Boolean (bool), Char (char),
and so on, as well as user-defined types such as Structure (struct) and Enumeration (enum).
Classes represent the majority of reference types. Other reference types include the interface,
delegate, and array types. Classes and structures are discussed in Lesson 3 of this chapter, and
other reference and value types are discussed in Chapter 3.

Using .NET Framework Types in Your Application

26
When you begin writing an application, you automatically begin with a reference to the .NET
Framework base class library. You reference it so that your application is aware of the base class
library and is able to create instances of the types represented by it.

Value Types

int myInteger;

This line tells the runtime to allocate the appropriate amount of memory to hold an integer
variable. Although this line creates the variable, it does not assign a value to it. You can assign a
value using the assignment operator, as follows:

myInteger = 42;

You can also choose to assign a value to a variable upon creation, as shown in this example:

int myInteger = 42;

Reference Types

Creating an instance of a type is a two-step process. The first step is to declare the variable as
that type, which allocates the appropriate amount of memory for that variable but does not
actually create the object. The following syntax declares an object:

System.Windows.Forms.Form myForm;

This line tells the runtime to set aside enough memory to hold a Form variable and assigns it the
name myForm, but it does not actually create the Form object in memory. The second step,
called instantiation, actually creates the object. An example of instantiation follows:

myForm = new System.Windows.Forms.Form();

27
This line makes a call to the constructor method of the type System.Windows.Forms.Form by
way of the New (new) keyword. The constructor is a special method that is invoked only at the
beginning of an object‘s lifetime. It contains any code that must be executed for the object to
work (assigning values to properties, for example). If any parameters were required by the
constructor, they would be contained within the parentheses at the end of the line. The following
example shows declaration and instantiation of a hypothetical Widget class that requires a string
as a parameter in the constructor.

Widget myWidget;
myWidget = new Widget("This string is required by the constructor");

If desired, you can also combine both declaration and instantiation into a single statement. By
declaring and instantiating an object in the same line, you reserve the memory for the object and
immediately create the object that resides in that memory. Although there was a significant
performance penalty for this shortcut in previous versions of Visual Basic, Visual Basic .NET
and Visual C# are optimized to allow this behavior without any performance loss. The following
example shows the one-step declaration and instantiation of a new Form:

System.Windows.Forms.Form myForm = new


System.Windows.Forms.Form();

Both value types and reference types must be initialized before use. For class and structure fields
in Visual Basic .NET, types are initialized with default values on declaration. Numeric value
types (such as integer) and floating-point types are assigned zero; Boolean variables are assigned
False; and reference types are assigned to a null reference.

In C#, variables of a reference type have a default value of null. It is recommended that you do
not rely on the default value. These variables should not be used until they have been initialized.

Using Value Type and Reference Type Variables

28
A variable that represents a value type contains all the data represented by that type. A variable
that represents a reference type contains a reference to a particular object. This distinction is
important. Consider the following example:

int x, y;
x = 15;
y = x;
x = 30;
// What is the value of y?

In this example, two integer variables named x and y are created. X is assigned a value of 15, and
then y is assigned the value of x. Next the value of x is changed to 30, and the question is posed:
what is the value of y? The answer to this question might seem obvious, and it is y = 15 because
x and y are two separate variables and have no effect on each other when changed. When the line
y = x is encountered, the value of x is copied to the value of y, and there is no further connection
between the two variables.

This situation changes, however, in the case of reference types. Let‘s reconsider the previous
example using a reference type (Form) instead of a value type.

System.Windows.Forms.Form x,y;
x = new System.Windows.Forms.Form();
x.Text = "This is Form 1";
y = x;
x.Text = "This is Form 2";
// What value does y.Text return?

What value does y.Text return? This time, the answer is less obvious. Because
System.Windows.Forms.Form is a reference type, the variable x does not actually contain a
Form; rather, it points to an instance of a Form. When the line y = x is encountered, the runtime
copies the reference from variable x to y. Thus, the variables x and y now point to the same

29
instance of Form. Because these two variables refer to the same instance of the object, they will
return the same values for properties of that object. Thus, y.Text returns ―This is Form 2‖.

The Imports and Using Statements

Up to this point of the chapter, if you wanted to access a type in the .NET Framework base class
library, you had to use the full name of the type, including every namespace to which it
belonged. For example:

System.Windows.Forms.Form

This is called the fully-qualified name, meaning it refers both to the class and to the namespace
in which it can be found. You can make your development environment ―aware‖ of various
namespaces by using the Imports (Visual Basic .NET) or using (Visual C#) statement. This
technique allows you to refer to a type using only its generic name and to omit the qualifying
namespaces. Thus, you could refer to System.Windows.Forms.Form as simply Form. In Visual
Basic .NET, the Imports statement must be placed at the top of the code window, preceding any
other statement (except Option). In Visual C#, the using statement must occur before any other
namespace element, such as a class or struct. This example demonstrates use of this statement:

using System.Windows.Forms;

When two types of the same name exist in more than one imported namespace, you must use the
fully qualified name to avoid a naming conflict. Thus, if you are using MyNameSpaceOne and
MyNameSpaceTwo, and each contains a Widget class, you would have to refer to
MyNameSpaceOne.Widget or MyNameSpaceTwo.Widget to ensure the correct result.

In C#, you can resolve namespace conflicts such as these by creating an alias. An alias allows
you to choose one name to refer to another class. You create an alias using the using keyword, as
shown below:

using myAlias = MyNameSpaceTwo.Widget;

30
After implementing an alias, you can use it in code to represent the aliased class. For example:

// You can now refer to MyNameSpaceTwo as myAlias. The


// following two lines produce the same result:
MyNameSpaceTwo.Widget anotherWidget = new MyNameSpaceTwo.Widget() ;
myAlias anotherWidget = new myAlias() ;

You cannot create aliases for types in this manner in Visual Basic .NET.

Referencing External Libraries

You might want to use class libraries not contained by the .NET Framework, such as libraries
developed by third-party vendors or libraries you developed. To access these external libraries,
you must create a reference.

To create a reference to an external library

1. In the Solution Explorer, right-click the References node of your project.


2. From the pop-up menu, choose Add Reference. The Add Reference dialog box appears.
3. Choose the appropriate tab for the library you want to reference. .NET libraries are
available on the .NET tab. Legacy COM libraries appear on the COM tab, and local
Visual Studio projects appear on the Projects tab.
4. Locate the library you want to reference, and double-click it to add it to the Selected
components box. Click OK to confirm the choice of that reference.

Introduction to Object-Oriented Programming

Programming in the .NET Framework environment is done with objects. Objects are
programmatic constructs that represent packages of related data and functionality. Objects are
self-contained and expose specific functionality to the rest of the application environment
without detailing the inner workings of the object itself. Objects are created from a template
called a class. The .NET base class library provides a set of classes from which you can create
31
objects in your applications. You also can use the MicrosoftVisual Studio programming
environment to create your own classes. This lesson introduces you to the concepts associated
with object-oriented programming.

Objects, Members, and Abstraction

An object is a programmatic construct that represents something. In the real world, objects are
cars, bicycles, laptop computers, and so on. Each of these items exposes specific functionality
and has specific properties. In your application, an object might be a form, a control such as a
button, a database connection, or any of a number of other constructs. Each object is a complete
functional unit, and contains all of the data and exposes all of the functionality required to fulfill
its purpose. The ability of programmatic objects to represent real-world objects is called
abstraction.

Classes Are Templates for Objects

Classes can be thought of as blueprints for objects: they define all of the members of an object,
define the behavior of an object, and set initial values for data when appropriate. When a class is
instantiated, an in-memory instance of that class is created. This instance is called an object. To
review, a class is instantiated using the New (new) keyword as follows:

When an instance of a class is created, a copy of the instance data defined by that class is created
in memory and assigned to the reference variable. Individual instances of a class are independent
of one another and represent separate programmatic constructs. There is generally no limit to
how many copies of a single class can be instantiated at any time. To use a real-world analogy, if
a car is an object, the plans for the car are the class. The plans can be used to make any number
of cars, and changes to a single car do not, for the most part, affect any other cars.

Objects and Members

Objects are composed of members. Members are properties, fields, methods, and events, and
they represent the data and functionality that comprise the object. Fields and properties represent
data members of an object. Methods are actions the object can perform, and events are
32
notifications an object receives from or sends to other objects when activity happens in the
application.

To continue with the real-world example of a car, consider that a Car object has fields and
properties, such as Color, Make, Model, Age, GasLevel, and so on. These are the data that
describe the state of the object. A Car object might also expose several methods, such as
Accelerate, ShiftGears, or Turn. The methods represent behaviors the object can execute. And
events represent notifications. For example, a Car object might receive an EngineOverheating
event from its Engine object, or it might raise a Crash event when interacting with a Tree object.

Object Models

Simple objects might consist of only a few properties, methods, and perhaps an event or two.
More complex objects might require numerous properties and methods and possibly even
subordinate objects. Objects can contain and expose other objects as members. For example, the
TextBox control exposes a Font property, which consists of a Font object. Similarly, every
instance of the Formclass contains and exposes a Controls collection that comprises all of the
controls contained by the form. The object model defines the hierarchy of contained objects that
form the structure of an object.

An object model is a hierarchical organization of subordinate objects contained and exposed


within a main object. To illustrate, let‘s revisit the example of a car as an object. A car is a single
object, but it also consists of subordinate objects. A Car object might contain an Engine object,
four Wheel objects, a Transmission object, and so on. The composition of these subordinate
objects directly affects how the Car object functions as a whole. For example, if the Cylinders
property of the Engine subordinate object is equal to 4, the Car will behave differently than a Car
whose Engine has a Cylinders property value of 8. Contained objects can have subordinate
objects of their own. For example, the contained Engine object might contain several SparkPlug
objects.

Encapsulation

33
Encapsulation is the concept that implementation of an object is independent of its interface. Put
another way, an application interacts with an object through its interface, which consists of its
public properties and methods. As long as this interface remains constant, the application can
continue to interact with the component, even if implementation of the interface was completely
rewritten between versions.

Objects should only interact with other objects through their public methods and properties.
Thus, objects should contain all of the data they require, as well as all of the functionality that
works with that data. The internal data of an object should never be exposed in the interface;
thus, fields rarely should be Public (public).

Returning to the Car example. If a Car object interacts with a Driver object, the Car interface
might consist of a GoForward method, a GoBackward method, and a Stop method. This is all the
information that the Driver needs to interact with the Car. The Car might contain an Engine
object, for example, but the Driver doesn‘t need to know about the Engine object—all theDriver
cares about is that the methods can be called and that they return the appropriate values. Thus, if
one Engine object is exchanged for another, it makes no difference to the Driver as long as the
interface continues to function correctly.

Polymorphism

Polymorphism is the ability of different classes to provide different implementations of the same
public interfaces. In other words, polymorphism allows methods and properties of an object to be
called without regard for the particular implementation of those members. For example, a Driver
object can interact with a Car object through the Car public interface. If another object, such as a
Truck object or a SportsCar object, exposes the same public interface, the Driver object can
interact with them without regard to the specific implementation of that interface. There are two
principal ways through which polymorphism can be provided: interface polymorphism and
inheritance polymorphism.

Interface Polymorphism

34
An interface is a contract for behavior. Essentially, it defines the members a class should
implement, but states nothing at all about the details of that implementation. An object can
implement many different interfaces, and many diverse classes can implement the same
interface. All objects implementing the same interface are capable of interacting with other
objects through that interface. For example, the Car object in the previous examples might
implement the IDrivable interface (by convention, interfaces usually begin with I), which
specifies the GoForward, GoBackward, and Halt methods. Other classes, such as Truck, Forklift,
or Boat might implement this interface and thus are able to interact with the Driver object. The
Driver object is unaware of which interface implementation it is interacting with; it is only aware
of the interface itself. Interface polymorphism is discussed in detail in Lesson 3.

Inheritance Polymorphism

Inheritance allows you to incorporate the functionality of a previously defined class into a new
class and implement different members as needed. A class that inherits another class is said to
derive from that class, or to inherit from that class. A class can directly inherit from only one
class, which is called the base class. The new class has the same members as the base class, and
additional members can be added as needed. Additionally, the implementation of base members
can be changed in the new class by overriding the base class implementation. Inherited classes
retain all the characteristics of the base class and can interact with other objects as though they
were instances of the base class. For example, if the Car class is the base class, a derived class
might be SportsCar. The SportsCar class might be the base class for another derived class, the
ConvertibleSportsCar. Each newly derived class might implement additional members, but the
functionality defined in the original Car class is retained.

35
CHAPTER 4

SYSTEM DESIGN

4.1 DATA MODEL

4.1.1 ER DIAGRAM

An entity-relationship diagram (ERD) is a graphical representation of an information


system that shows the relationship between people, objects, places, concepts or events within that
system. An ERD is a data modeling technique that can help define business processes and can be
used as the foundation for a relational database.

Fig.4.1.1 ER Diagram

36
4.1.2 DATA DICTIONARY

A data dictionary is a collection of descriptions of the data objects or items in a data


model for the benefit of programmers and others who need to refer to them. analyzing a system
of objects with which users interact is to identify each object and its relationship to other objects.
This process is called data modeling and results in a picture of object relationships. After each
data object or item is given a descriptive name, its relationship is described the type of data is
described, possible predefined values are listed, and a brief textual description is provided. This
collection can be organized for reference into a book called a data dictionary.

Fig.4.1.2 Data Dictionary

37
4.1.3 DATABASE MODEL

Data modeling is often the first step in database design and object-oriented programming
as the designers first create a conceptual model of how data items relate to each other. Data
modeling involves a progression from conceptual model to logical model to physical schema.

38
4.1.4 TABLE RELATIONSHIP

A relationship works by matching data in key columns, usually columns with the same name in
both tables. In most cases, the relationship matches the primary key from one table, which
provides a unique identifier for each row, with an entry in the foreign key in the other table.

Fig.4.1.3 Table Design

39
4.2 PROCESS MODEL

4.2.1 CONTEXT ANALYSIS

Fig.4.2.1.1 Login Process

40
4.2.2 UML DIAGRAMS

The Unified Modeling Language is a graphical language for visualizing, specifying


constructing and documenting of software intensive systems. The various UML diagrams used
here are Use-Case diagram, Class diagram, Sequence diagram etc.

4.2.2.1 USE CASE DIAGRAM

The purpose of use case diagram is to capture the dynamic aspect of a system. But this
definition is too generic to describe the purpose.

The purposes of use case diagrams can be as follows:

 Used to gather requirements of a system.

 Used to get an outside view of a system.

 Identify external and internal factors influencing the system.

 Show the interacting among the requirements are actors.

41
42
43
44
45
4.2.2.2 CLASS DIAGRAM

The class diagram is a static diagram. It represents the static view of an application. Class
diagram is not only used for visualizing, describing and documenting different aspects of a
system but also for constructing executable code of the software application.

The class diagram shows a collection of classes, interfaces, associations, collaborations


and constraints. It is also known as a structural diagram.

So the purpose of the class diagram can be summarized as:

 Analysis and design of the static view of an application.

 Describe responsibilities of a system.

 Base for component and deployment diagrams.

 Forward and reverse engineering.

46
Fig.4.2.2.2 Class Diagram

47
4.2.2.3 SEQUENCE DIAGRAM

From the name Interaction it is clear that the diagram is used to describe some type of
interactions among the different elements in the model. So this interaction is a part of dynamic
behavior of the system.

This interactive behavior is represented in UML by two diagrams known as Sequence


diagram and Collaboration diagram. The basic purposes of both the diagrams are similar.

Sequence diagram emphasizes on time sequence of messages and collaboration diagram


emphasizes on the structural organization of the objects that send and receive messages.
So the purposes of interaction diagram can be describes as:

 To capture dynamic behaviour of a system.

 To describe the message flow in the system.

 To describe structural organization of the objects.

 To describe interaction among objects.

48
Fig.4.2.2.3 Sequence Diagram

49
Fig.4.2.2.3 .a. Blocking User

50
Fig.4.2.2.3.b. Checking Suspected User

51
Fig.4.2.2.3.c.Updating Result

52
4.2.2.4 COLLABORATION DIAGRAM

The interaction diagram is also called as collaboration diagram. It shows the object
organization as shown below. Here in collaboration diagram the method call sequence is
indicated by some numbering technique as shown below. The number indicates how the methods
are called one after another. We have taken the same order management system to describe the
collaboration diagram.

The method calls are similar to that of a sequence diagram. But the difference is that the
sequence diagram does not describe the object organization where as the collaboration diagram
shows the object organization.

Now to choose between these two diagrams the main emphasis is given on the type of
requirement. If the time sequence is important then sequence diagram is used and if organization
is required then collaboration diagram is used.

53
Fig.4.2.2.4 Collaboration Diagram

54
4.2.2.5 ACTIVITY DIAGRAM

Activity diagram is another important diagram in UML to describe dynamic aspects of


the system.

Activity diagram is basically a flow chart to represent the flow form one activity to
another activity. The activity can be described as an operation of the system.

So the control flow is drawn from one operation to another. This flow can be sequential,
branched or concurrent. Activity diagrams deals with all type of flow control by using different
elements like fork, join etc.

So the purposes can be described as:

 Draw the activity flow of a system.

 Describe the sequence from one activity to another.

 Describe the parallel, branched and concurrent flow of the system.

55
56
4.2.2.6 DEPLOYMENT DIAGRAM

Deployment diagrams are used to visualize the topology of the physical components of a
system where the software components are deployed.

So deployment diagrams are used to describe the static deployment view of a system.
Deployment diagrams consist of nodes and their relationships.
So the usage of deployment diagrams can be described as follows:

 To model the hardware topology of a system.

 To model embedded system.

 To model hardware details for a client/server system.

 To model hardware details of a distributed application.

 Forward and reverse engineering.

Fig.4.2.2.6 Deployment Diagram

57
4.2.2.7 SYSTEM ARCHITECTURE

A system architecture or systems architecture is the conceptual model that defines the
structure, behavior, and more views of a system. An architecture description is a formal
description and representation of a system, organized in a way that supports reasoning about the
structures and behaviors of the system.

A system architecture can comprise system components, the externally visible properties
of those components, the relationships (e.g. the behavior) between them. It can provide a plan
from which products can be procured, and systems developed, that will work together to
implement the overall system. There have been efforts to formalize languages to describe system
architecture, collectively these are called architecture description languages (ADLs)

Refers to the fundamental structures of a software system, the discipline of creating such

structures, and the documentation of these structures. These structures are needed to reason about

the software system. Each structure comprises software elements, relations among them, and

properties of both elements and relations, along with rationale for the introduction and

configuration of each element. The architecture of a software system is a metaphor, analogous to

the architecture of a building.

Software architecture is about making fundamental structural choices which are costly to change

once implemented. Software architecture choices, also called architectural decisions, include

specific structural options from possibilities in the design of software. For example, the systems

that controlled the space shuttle launch vehicle had the requirement of being very fast and very

reliable. Therefore, an appropriate real-time computing language would need to be chosen.

Additionally, to satisfy the need for reliability the choice could be made to have multiple

58
redundant and independently produced copies of the program, and to run these copies on

independent hardware while cross-checking results.

Documenting software architecture facilitates communication between stakeholders, captures

decisions about the architecture design, and allows reuse of design components between projects.

Fig.4.2.2.7 System Architecture

59
4.2.2.8 DATAFLOW DIAGRAM

A Data Flow Diagram (DFD) is a graphical representation of the "flow" of data through
an information system, modeling its process aspects. A DFD is often used as a preliminary step
to create an overview of the system, which can later be elaborated.[2] DFDs can also be used for
the visualization of data processing (structured design).

A DFD shows what kind of information will be input to and output from the system,
where the data will come from and go to, and where the data will be stored. It does not show
information about the timing of process or information about whether processes will operate in
sequence or in parallel (which is shown on a flowchart).

First level DFD:

The first level DFD shows the main processes within the system. Each of these

processes can be broken into further processes until you reach pseudo code. The major processes

in our system are issue raising, issue resolving, search process and report generation on issues

and generating a first level DFD for each individual field.

Detailed level DFD:

This level explains each process of the system in a detailed manner. In first detailed

level DFD (generation of individual fields): how data flows through individual process/fields in

it are shown. In second detailed level DFD (generation of detailed process of the individual

60
fields): how data flows through the system to form a detailed description of the individual

processes.

System components:

Symbolizes process

Symbolizes data flow

Symbolizes External entity

Symbolizes data store

The data flow diagram is one of the most important tools used for the system

analysis. ADEMACRO (1978) and SARSON (1979) populated the use of data flow diagrams as

modeling tool through their structured analysis methodologies. They suggested that a data flow

61
diagram should be the first tool used by the analyst to model the system components. There are

four types of system components. They are

Process:

Process shows what system does. A process is represented by a circle as shown

above. Each process is given a unique name and a unique number. Each process takes one or

more data inputs and produces one or more data outputs.

Data flows:

Data flows made the passage of data and are represented by the line joining the

system components. An arrow is used to indicate the direction of data flow shown in the above

and the line is labeled by the name of the data flow.

Data stores:

Data store is used to represent the repository of the data that maintains in the system.

A process can store data into a data store or retrieve the data from the data store. A data store is

represented by a thin line as shown in the above.

62
External Entities:

External entities are the outside the system but they either supply input into system or

use system output. The designer has to control over these entities. These are represented by a

square or rectangle outputs as shown in the above.

The context level data flow diagram shown above gives a brief idea about the flow of

data should be and it is also shows the control if some data are invalid.

Flow Charts:

A system flow chart is a high-level picture of a physical system. In the structured

analysis, we begin by constructing the logical model of the system, often using the Data Flow

Diagrams. During the system design, the logical model is transformed into the physical system.

A system flowchart is the traditional tool for description a physical system. The basic

idea is to provide a symbol to each discrete component in the system. The most frequently used

symbols are:

63
Process Document

Database Display

Modules:

1. Administration module

2. Field officer module

3. Citizen module

1 Administration:

Administrator will enter into the next form by entering username, password in this

login page, after entering into next page Administrator will add new details and he can also

delete. Constitution and district details, admin will activate the users and their profile for being

part of the website and he will activate the users and after user completing their voting admin

will count their votes count will generate automatically for individual parties and he will be

having whole report with him. , and if he wants he will modify and maintains everything by date

wise.

1 Field officers:

64
Field officer will contain whole voter information means he will have whole citizen

information about their contact details, voter id, district, constitution

And all the details about the citizen and he will send that report to admin

2 Citizens:

Citizens are user‘s first login into valid username and password If Use is not registered then

User will register the details first. After getting registered user will get username and

password with that he will enter the site and they will get their voter id and they will vote for

their required party.

DATA FLOW DIAGRAMS:

Level 0:

Field officer

Online Database
Admin polling
65
system
Level1:

Registration
and login
User credentials Request
process
Response Database

Voting for
Vote for selected party selected
party

Level2:

Registration
and login
Admin credentials Request
process
Response Database

Add users
Userdetails and voting info and count
votes
66
Level3:

Registration
and login
Field officer credentials Request
process
Response Database

View voter info


View user‘s info and send reports
& send report
to admin

67
CHAPTER 5

MODULE DESCRIPTION

5.0 LIST OF MODULES

MODULES:

 Register

 Login

 Administration module

 Field officer module

 Citizen module

REGISTER

The registration form is used to register the detail about the relevant user to access the
application. It consists of the following details like name of the user, password about the relevant
user.

• New user has to register using the Registration Icon.


• The new user should be added into the database and it must be displayed in the user grid.
• User can easily delete or update their data‘s in the modules.
• Maintain your profile
• Manage your account

LOGIN

A Login is the act, made by a User, of connecting to a system or network service.


Usually, a User must enter some Credentials. The user will log in to the application using the
relevant detail like user name and the password created in the login form.
68
ADMINISTRATION:

Administrator will enter into the next form by entering username, password in this login
page, after entering into next page Administrator will add new details and he can also delete.
Constitution and district details, admin will activate the users and their profile for being part of
the website and he will activate the users and after user completing their voting admin will count
their votes count will generate automatically for individual parties and he will be having whole
report with him. , and if he wants he will modify and maintains everything by date wise.

FIELD OFFICERS:

Field officer will contain whole voter information means he will have whole citizen
information about their contact details, voter id, district, constitution. And all the details about
the citizen and he will send that report to admin

CITIZENS:

Citizens are user‘s first login into valid username and password If Use is not registered
then User will register the details first. After getting registered user will get username and
password with that he will enter the site and they will get their voter id and they will vote for
their required party.

69
CHAPTER 6

SYSTEM ARCHITECTURE

System architecture

Refers to the fundamental structures of a software system, the discipline of creating such

structures, and the documentation of these structures. These structures are needed to reason about

the software system. Each structure comprises software elements, relations among them, and

properties of both elements and relations, along with rationale for the introduction and

configuration of each element. The architecture of a software system is a metaphor, analogous to

the architecture of a building.

Software architecture is about making fundamental structural choices which are costly to change

once implemented. Software architecture choices, also called architectural decisions, include

specific structural options from possibilities in the design of software. For example, the systems

that controlled the space shuttle launch vehicle had the requirement of being very fast and very

reliable. Therefore, an appropriate real-time computing language would need to be chosen.

Additionally, to satisfy the need for reliability the choice could be made to have multiple

redundant and independently produced copies of the program, and to run these copies on

independent hardware while cross-checking results.

Documenting software architecture facilitates communication between stakeholders, captures

decisions about the architecture design, and allows reuse of design components between projects.

70
Proposed Architecture Diagram

71
CHAPTER 7

SYSTEM IMPLEMENTATION CODING

7.1 IMPLEMENTATION CODING


Onlinepollingsystem.sln

Microsoft Visual Studio Solution File, Format Version 11.00

# Visual Studio 2010


Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Onlinepollingsystem", ".",
"{6CB2D7D7-F171-440A-B8B4-FEA46E24C305}"
ProjectSection(WebsiteProperties) = preProject

TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Debug.AspNetCompiler.VirtualPath = "/Onlinepollingsystem"
Debug.AspNetCompiler.PhysicalPath = "..\Onlinepollingsystem\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Onlinepollingsystem\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"

Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/Onlinepollingsystem"
Release.AspNetCompiler.PhysicalPath = "..\Onlinepollingsystem\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Onlinepollingsystem\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"

Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "57982"

72
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Debug|Any CPU = Debug|Any CPU


EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6CB2D7D7-F171-440A-B8B4-FEA46E24C305}.Debug|Any CPU.ActiveCfg =
Debug|Any CPU
{6CB2D7D7-F171-440A-B8B4-FEA46E24C305}.Debug|Any CPU.Build.0 =
Debug|Any CPU
EndGlobalSection

GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

MainMasterPage.master.cs
using System;

using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;

using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

73
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

public partial class MainMasterPage : System.Web.UI.MasterPage

{
protected void Page_Load(object sender, EventArgs e)
{

}
}

MainMasterPage.master
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MainMasterPage.master.cs"
Inherits="MainMasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1

{
width: 100%;
height: 511px;

74
}
.style2
{
height: 64px;

}
.style3
{
height: 64px;
width: 395px;
}

.style4
{
width: 395px;
}
.style5
{

height: 64px;
width: 359px;
}
.style6
{
width: 359px;

}
.style7
{
height: 64px;
width: 209px;
75
}
.style8
{
width: 209px;

}
.style9
{
width: 209px;
height: 145px;

}
.style10
{
height: 145px;
}

.style11
{}

</style>
</head>
<body>

<form id="form1" runat="server">


<asp:Label ID="Label1" runat="server"
style="position:absolute; top: 48px; left: 295px; width: 474px;"
Text="Online Voting System" Font-Bold="True" Font-Size="XX-Large"
ForeColor="#FF3300"></asp:Label>
76
<asp:Image ID="Image1" runat="server" AlternateText="Online Voting System"
ForeColor="#FFCC66" Height="124px" ImageUrl="~/Images/votemachine.jpeg"
Width="1081px" />
<table class="style1">

<tr bgcolor="Gray">
<td class="style7">
<asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True"
ForeColor="#FF9900" ImageUrl="~/Images/admin.jpeg"
NavigateUrl="~/AdminLogin2.aspx">Admin Login</asp:HyperLink>

Admin&nbsp; Login
</td>
<td class="style3">
<asp:HyperLink ID="HyperLink2" runat="server"
ImageUrl="~/Images/fieldmain.jpeg"
NavigateUrl="~/Officer/Officerlogin.aspx">Field Manager</asp:HyperLink>

Field Officer Login</td>


<td class="style5">
<asp:HyperLink ID="HyperLink3" runat="server" ImageUrl="~/Images/user.jpeg"
NavigateUrl="~/Citizen/Login.aspx">User
Login</asp:HyperLink>
<br />

Voter Login</td>
<td class="style2" colspan="2">
&nbsp;</td>
</tr>
<tr>
77
<td class="style9" bgcolor="Black">
<asp:Menu ID="Menu1" runat="server" Font-Bold="True" ForeColor="White"
Height="143px" Width="125px">
<Items>

<asp:MenuItem Text="Admin Login" Value="Admin Login"


NavigateUrl="~/AdminLogin2.aspx"></asp:MenuItem>
<asp:MenuItem Text="Field Officer Login" Value="Field Officer Login"
NavigateUrl="~/Officer/OffLogin.aspx">
</asp:MenuItem>
<asp:MenuItem Text="Voter Login" Value="Voter Login"

NavigateUrl="~/Citizen/Citilogin.aspx"></asp:MenuItem>
</Items>
</asp:Menu>
</td>
<td class="style10" colspan="4">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

<p>
<br />
</p>
<p>
</p>
<p>

</p>
<p>
</p>
<p>
</p>
78
<p>
</p>
</asp:ContentPlaceHolder>
</td>

</tr>
<tr>
<td class="style8">
&nbsp;</td>
<td class="style4">
&nbsp;</td>

<td class="style6">
&nbsp;</td>
<td class="style11">
&nbsp;</td>
<td>
&nbsp;</td>

</tr>
<tr>
<td colspan="5">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label4" runat="server" Style="position: static"
Text="Copyright @2017 sansofttechnology.in All Rights Reserved."></asp:Label>

</td>

79
</tr>
</table>
</form>
</body>

</html>

AdminLogin2.aspx
using System;
using System.Collections;
using System.Configuration;
using System.Data;

using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class AdminLogin2 : System.Web.UI.Page


{

SqlConnection con = new SqlConnection("Data Source=AJAY-PC;Initial


Catalog=onlinepollin;User ID=sa;Password=security");
SqlCommand cmd;
SqlDataAdapter da;

DataSet ds;

80
DataTable dt;
protected void Page_Load(object sender, EventArgs e)
{
con.Open();

}
protected void Button3_Click(object sender, EventArgs e)
{
if (TextBox4.Text != "" && TextBox5.Text != "")
{
if (TextBox4.Text == "Admin" && TextBox5.Text == "Admin")

{
Response.Redirect("~/Admin/Create User.aspx");
}

else
{

Label9.Text = "Invalid userid and password.Its Deactivated by Admin.Try Agian!.";


TextBox5.Text = "";
}
}
}

protected void Button4_Click(object sender, EventArgs e)


{
TextBox4.Text = TextBox5.Text = "";
}
protected void LinkButton1_Click(object sender, EventArgs e)
81
{
Response.Redirect("Home.aspx");
}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminLogin2.aspx.cs"


Inherits="AdminLogin2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 100%;
}

.style2
{
width: 142px;
}
.style3
{

width: 100px;
height: 28px;
}

82
</style>
</head>
<body>
<form id="form1" runat="server">

<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<table class="style1">
<tr>
<td colspan="2">
<br />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="XX-Large"
ForeColor="#0000CC" Text="ONLINE NATIONAL POLLING"></asp:Label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />
</td>
</tr>
<tr>

<td colspan="2">

83
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton1" runat="server" Font-Bold="True"
ForeColor="#3399FF" onclick="LinkButton1_Click">Home</asp:LinkButton>
&nbsp;</td>

</tr>
<tr>
<td class="style2">
<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td>
<table style="width: 340px; position: static; height: 196px">

<tr>
<td colspan="3">
&nbsp;<asp:Label ID="Label8" runat="server" Font-Bold="True"
Style="position: static" Text="Admin Login &gt;&gt;"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
84
<tr>
<td style="width: 100px; height: 21px">
<asp:Label ID="Label7" runat="server" Style="position: static"
Text="User Name :"></asp:Label>

</td>
<td style="width: 100px; height: 21px">
<asp:TextBox ID="TextBox4" runat="server" Style="position:
static"></asp:TextBox>

</td>
<td style="width: 100px; height: 21px">
</td>
</tr>
<tr>
<td style="width: 100px">

<asp:Label ID="Label6" runat="server" Font-Bold="False"


Style="position: static" Text="Password :"></asp:Label>
</td>
<td style="width: 100px">
<asp:TextBox ID="TextBox5" runat="server" Style="position: static"
TextMode="Password"></asp:TextBox>

</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td align="center" colspan="3">

<asp:Label ID="Label9" runat="server" Style="position: static"></asp:Label>

85
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>

<td class="style3">
</td>
<td class="style3">
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click"
Style="position: static" Text="Sign In &gt;&gt;" />
</td>

<td class="style3">
<asp:Button ID="Button4" runat="server" Text="Clear" onclick="Button4_Click" />
</td>
</tr>
</table>
</td>

</tr>
</table>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;

</p>
</form>
</body>
</html>

86
CHAPTER 7
TESTING CASES

ADMINISTRATOR

VOTER

USE CASES:

1. STARTING SESSION SCENARIO

Who: voter

What: the voter enters initial information

Goal: begin voting process by validating the user‘s identification

The user signs into the system using their name, social security number, and voter ID (they must
be registered to vote to continue with the session – this is done separately from the online voting
system). They are given several chances to enter in this information correctly. An error message
will be displayed if the information is not correct. Upon several incorrect submissions, the user
will no longer be able to try to start a voting session unless they receive permission from an
administrator. If their voter information is accepted, the system will check to see if they have
already voted in this election. If they have, they will be denied entrance into the voting session.
Otherwise, the session will proceed to the personal information section.

87
2. OBTAINING PERSONAL INFORMATION SCENARIO

Who: voter

What: the voter enters personal information

Goal: record voter profile for statistical purposes

The voter has been successfully signed in to the system at this point. The voter will then be asked
to fill in information regarding such issues as gender, residency, party affiliation (optional), age,
etc. This information will remain anonymous during statistical analysis. After filling in all fields
successfully, the voter may then choose between starting the voting session and exiting. If the
voter chooses to exit, their personal information will not be saved and must be entered in again if
they start a new voting session.

3. REGISTERED VOTER SCENARIO

Who: voter

What: enter their vote in the system

Goal: cast their vote

The voter is valid and their personal information has been saved at this point. They will then be
presented with the election referendums or candidates for which to vote. The system will only
allow the appropriate number of boxes to be checked for each category. The voter can change
what they are voting for as long as they have not chosen to submit their votes or to exit the
session. Once all categories are complete, the user will be given the option to either ‗submit
votes‘ or ‗exit‘. Choosing ‗submit votes‘ will enter the voter‘s selections into the system for
tallying, thus preventing the voter from ever changing their vote again. The voter‘s name will
also be tagged so they will not be allowed to vote again in this election. Choosing ‗exit‘ will
discard all information the voter entered and return to the startup screen. The voter‘s name will
not be tagged thus allowing the voter to start the voting process over.

88
4. ADMINISTRATOR VALIDATION SCENARIO

Who: administrator

What: checks the administrator‘s information for validity

Goal: let a valid administrator operate within the system

The administrator is asked for their name, administration ID number, and administrative
password. They are given two tries to enter this information in correctly. If their information is
not accepted, they will not be allowed to manipulate the system. If their information is accepted,
they will be allowed to enter a session where they have several options.

5. ADMINISTRATOR OVERRIDE SCENARIO

Who: administrator

What: the voter cannot obtain entry into the voting system

Goal: allow a valid voter to enter the system properly

The voter is unable to enter the voting session because of a system error. The administrator will
check through other sources to see if the information the voter was submitting is in fact valid. If
it is, the administrator will start a session for the user beginning at the personal information
section. Otherwise, have the person arrested for fraud.

6. GET STATISTICS SCENARIO

Who: administrator

What: compute the information asked for by the administrator

Goal: return the desired statistic

89
The administrator will select the categories from which they want statistics from a list of
personal information fields. There will not be a limit to the number of categories that can be
selected at one time. For instance, the administrator can ask simply for the number of males that
have voted thus far, or the may ask for the number of republican males in Durham County that
have voted. After making their selection, the system will obtain and return the desired statistic.
The administrator will only have access to the personal information fields, not the votes.

7. TALLY VOTES SCENARIO

Who: administrator

What: the system computes the vote tally AFTER the time period is up

Goal: a tally of the votes

The system first checks the time to make sure that the election time period has completed. If it
has not, the administrator is denied access into this section. If the election has completed, the
administrator will be allowed to ask for a tally of the votes in any particular area or for a
complete summary sheet.

SYSTEM TESTING

The purpose of testing is to discover errors. Testing is the process of trying to


discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, sub assemblies, assemblies and/or a finished
product It is the process of exercising software with the intent of ensuring that
theSoftware system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a specific
testing requirement.

TYPES OF TESTS

90
Unit testing
Unit testing involves the design of test cases that validate that the internal program logic
is functioning properly, and that program input produces valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and expected results.

Integration testing
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components is
correct and consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components.

Functional test

Functional tests provide a systematic demonstration that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.

Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

91
Output : identified classes of application outputs must be exercised.

Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key functions, or


special test cases. In addition, systematic coverage pertaining to identify

Business process flows; data fields, predefined processes, and successive processes must be
considered for testing. Before functional testing is complete, additional tests are identified and
the effective value of current tests is determined.

System Test
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.

White Box Testing


White Box Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is purpose. It is
used to test areas that cannot be reached from a black box level.

Black Box Testing


Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests,
must be written from a definitive source document, such as specification or requirements
document, such as specification or requirements document. It is a testing in which the software
under test is treated, as a black box .you cannot ―see‖ into it. The test provides inputs and
responds to outputs without considering how the software works.

92
7.1 Unit Testing:

Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.

Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives

 All field entries must work properly.


 Pages must be activated from the identified link.
 The entry screen, messages and responses must not be delayed.

Features to be tested

 Verify that the entries are of the correct format


 No duplicate entries should be allowed
 All links should take the user to the correct page.

93
7.2 Integration Testing

Software integration testing is the incremental integration testing of two or more


integrated software components on a single platform to produce failures caused by interface
defects.

The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level –
interact without error.

Integration testing for Database Synchronization:

 Testing the links that call the Change Username & password, Migration and
Synchronization screens etc.
 The username should be retained throughout the application in the form of hidden
variables or by using cookies.
 If the login user does not have enough privileges to invoke a screen, the link should be
disabled.
 Any modification in the Master server should be reflected in the Slave server.
 The XML file should retrieve only the records, which have been modified.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

94
7.3 Acceptance Testing

User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.

Acceptance testing for Data Synchronization:

 Users have separate roles to modify the database tables.


 The timestamp for all insertions and updating should be maintained.
 Users should have the ability to modify the privilege for a screen.
 Once the Synchronization starts, the Master server or Slave Server should not be stopped
without notifying the other.
 The XML file should be generated in short time, i.e., before the next modification occurs.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

95
CHAPTER 10

SCREENSHOTS

96
CHAPTER 11

CONCLUSION

The main aspect behind OVS is that it enabled us to bring out the new ideas that were sustained
within us for many for many days. This project offers the voters to cast easily through internet.
Vote counting is also made easy by the OVS since it‘s just a matter of querying the database.
OVS is used by a number of countries today. Developing a good system is critical to the success
of the system to prevent system failures and to gain wide acceptance as the best method
available. A good OVS system requires ten characteristics which this system already has. These
are:

Accuracy Convenience Reliability


Verifiability Flexibility Consistency
Democracy Mobility Social Acceptance
Privacy

In analyzing, designing, implementing, and maintaining standards, we considered these


characteristics as the foundation. These standards were made national. OVS will be an
inexpensive, and less time consuming method once a system exhibiting national standards and
the above mentioned characteristics is implemented.

97
RECOMMENDATIONS
After my research and my finalization of this project, I highly recommend that the online voting system
(OVS) serves to be the best to be put in use especially in the 21 st century where human beings are
embracing technology and where there is malicious struggle for power by leaders all over the world. This
struggle for power has resulted in the use of all approaches by the leaders in power to remain in their
positions at whatever costs even if it means applying vote rigging to win elections.

With this system in place, a number of such problems shall be forgotten. I therefore recommend that the
IEBC should put the OVS technology at practice to phase out some of the problems they go through
during manual voting.

98
CHAPTER 12

REFERENCES

REFERENCES
Anderson C. (2006). How to Rig a Democracy: A Timeline of Electronic Voting in the United
States. The Independent. Retrieved November 28, 2006 from:
http://www.indypendent.org/?p=608

Bellis, M. (2007). The History of Voting Machines. Retrieved November 9, 2006 from:
http://inventors.about.com/library/weekly/aa111300b.htm

Cranor, L.F., & Cytron, R.K. (1996). Design and Implementation of a Security-Conscious
Electronic Polling System. Washington University Computer Science Technical Report
(WUCS). Retrieved October 9, 2006 from: http://www.acm.org/crossroads/ords2-
4/voting.html

Electronic Voting and Counting – Development of the System. (2005). Elections ACT.
Retrieved February 11, 2007 from: http://www.elections.act.gov.au/EVACS.html

http://www.iiec.or.ke/

99

Das könnte Ihnen auch gefallen