Electronic Voting System
Electronic Voting System
Electronic Voting System
1. PROBLEM STATEMENT
An electronic voting system via the Internet must fulfill the following five basic
requirements:
• Only people eligible to vote should be able to vote.
• It should be possible to use one’s vote only once.
• Ballots should be absolutely secret.
• It should not be possible for a vote cast to be changed by anyone else.
• The system should ensure correct tallying of votes at all levels (voting district,
constituency and area).
Other circumstances that may need to be taken into account in such a system are
safeguards for the voter’s personal integrity and means of preventing the sale of votes.
Authentication:
At present, the election database contains the national civic registration number of
everyone who is included in the electoral register. In an Internet voting system, the electoral
register needs supplement with the voter’s personal password or code, to permit reliable
identification.
Ballot secrecy:
The system must not be technically feasible for any one to access the Ballot
information and should transmit it to the counting system.
Analysis
Use case view
2. IDENTIFICATION OF ACTORS
Actors represent system users. They help delimit the system and give a clear picture
of what the system should do. It is important to note that an actor interacts with, but has no
control over the use cases.
ACTOR
1. Voter: A member of the organization who participates in the election by casting his/her vote.
voter
(from Actors)
Candidate
(from Actors)
3. Administrator: The person who takes care of conducting the elections by declaring the
election details and declaring the results.
Administrator
(from Actors)
4. Election Database: External resource used by the system for voter Identification and profile
manipulation operation.
Election Database
(from Actors)
5. Election Commission: System that maintains the election database and get benefit form the
e-voting process.
4
Election Commission
(from Actors)
In its simplest form a use case can be described as a specific way of using the system
from a user’s perspective.
A more detailed description might characterize a use case as:
• A pattern of behavior the system exhibits
• A sequence of related transactions performed by an actor and the system
• Delivering something of value to the actor.
Use case provides a mean to:
1. Capture system requirements
2. Communicate with the end users and domain experts
3. Test the system
Use cases are the best discovered by examining the actors and defining what the actor
will be able to do with the system. Since all needs of a system typically cannot be covered in
one use case, it is usual to have a collection of use cases. Together this use case collection
specifies all ways of using the system.
voting
(from voti ng)
2. View profile: It allows the Authorized voter to see the candidate/his profile and to get
know about this vote that is polled for selected candidate with a confirmation receipt to voter.
4. Profile Manipulation: It will process the profile of voters and the candidates that includes the
certain, modification and deletion process.
5. Ballot Secrecy: It makes the ballot information secured and passes the encrypted secured
ballot information to the results use case.
6. Results: Performs the counting of ballots polled for each candidate and announce the
Election results to the Election commission.
6
4.0 Preconditions
There are no preconditions.
4.0 Preconditions
4.1. Authentication:
The voter must be identified as a valid voter before entering into this use case.
4.0 Preconditions
4.1. Authentication:
The voter must be identified as a valid voter before entering into this use case.
4.0 Pre-conditions
There are no pre-condition.
6. Use Case Specification for the Ballot Secrecy system Use Case:
1.0 Use Case Name
Ballot Secrecy System
4.0 Pre-conditions
There are no pre-conditions.
4.0 Pre-conditions
Ballot information should be secured before the counting.
4.0 Pre-conditions
There are no pre-conditions.
Use case diagrams depict system behavior (use cases). These diagrams present a high
level view of how the system is used as viewed from an outsider’s (actor’s) perspective. A use
case diagram may depict all or some of the use cases of a system.
A use-case diagram can contain:
• Actors (“things” outside the system)
• Use case (system boundaries identifying what the system should do)
• Interactions or relationships between actors and use case in the system including the
associations, dependencies, and generalizations.
Uses associations
The uses association occurs when we are describing our use cases and notice that
some of them have sub flows in common to avoid describing a sub flow more than once in
several use cases, you can extract the common sub flow and make it a use case of its own. This
new use case then can be used by other use cases. The relationships among the other use cases
and this new extracted use case are called uses association.
Extends association
An extends association is a stereo typed association that specifies how the
functionality of one use case can be inserted in to the functionality of another use case. Extend
relationships between use cases are modeled as dependency by using the extend stereotype.
Includes association
An include association is a stereo typed association that connects a base use case to
an inclusion use case.
16
The main use case diagram of E-voting system:
17
6. BUILD A BUSINESS PROCESS MODEL USING
ACTIVITY DIAGRAM
Logical View
Identification of classes can be done by the noun phrase approach, the common class
patterns approach, the use-case driven sequence/collaboration modeling approach and the
classes’ responsibilities and collaborators (CRC) approach.
Out of these, the noun phrase is used to identify the classes to increase our understanding of the
subject.
Administrator
Authentication
Voter
Ballot
Ballot code
Ballot number
Ballot paper
Candidate
Election
Election Database Information
Election commission
Login id
Name
Online voting system
Password
Profile
View profile
Profile modification
Results
Voting System
Voting server
23
4. Reviewing the classes containing adjectives:
In this system we have no classes containing adjectives that we can eliminate.
Administrator
Authentication
Voter
Ballot
Ballot code
Ballot number
Ballot paper
Candidate
Election
Election Database Information
Election commission
Login id
Name
Online voting system
Password
Profile
View profile
Profile modification
Results
Voting System
Voting server
24
6. The Final List of Classes is:
Administrator
Authentication
Voter
Candidate
Data base information
Election Commission
View profile
Voting information
Profile Modification
Ballot information
Results
Voting system
25
8. IDENTIFY THE RESPOSIBILITIES OF CLASSES
Each message is represented by an Arrow between the lifelines of two objects. The
order in which these messages occur is shown top to bottom on the page. Each message is
labeled with the message name. The label also can include the argument and some control
information and show self-delegation, a message the argument and some control information
and show self-delegation, a message that an object sends to itself, by sending the message
arrow back to the same lifeline. The horizontal ordering of the lifelines is arbitrary. Often, call
arrows are arranged to proceed in one direction across the page, but this is not always possible
and the order conveys no information.
The sequence diagram is very simple and has immediate visual appeal---this is its
great strength. A sequence diagram is an alternative way to understand the overall flow of the
control of a program, instead of looking at the code and trying to find out the overall sequence
of behavior.
The following tools located on the sequence diagram toolbox which enable to model sequence
diagrams:
Object: An object has state, behavior, and identity. The structure and behavior of
similar objects are defined in their common class. Each object in a diagram indicates
some instance of a class. An object that is not named is referred to as a class instance.
28
Message Icons: A message icon represents the communication between objects
indicating that an action will follow. The message icon is a horizontal, solid arrow
connecting two lifelines together.
Focus of Control: Focus of Control (FOC) is an advanced notational technique that
enhances sequence diagrams. It shows the period of time during which an object is
performing an action, either directly or through an underlying procedure.
Message to Self: A Message to Self is a tool that sends a message from one object back
to the same object. It does not involve other objects because the message returns to the
same object. The sender of a message is the same as the receiver.
Note: A note captures the assumptions and decisions applied during analysis and
design. Notes may contain any information, including plain text, fragments of code, or
references to other documents.
Note Anchor: A note anchor connects a note to the element that it affects.
Sequence diagrams for each uses case of E-Voting system are as follows:
1: Enter loginID
2: Not Valid
3: Valid
4: Caste Vote
29
1: Ballot Report
2: Secure
1: Enter LoginID
2: Not Valid
3: Valid
1: Voter Information
2: Create Profile
3: Report
4: Send Profile
5: Modify Profile
6: Report Update
1: Voter information
2: Create Database
3: Report
4: Voter Information
5: Get Database
6: Update
7: Save updates
33
Results use case realization:
3: Count Results
4: Send Report
5: Declare Results
1: Enter LoginID
2: Not Valid
3: Caste Vote
Collaboration diagram is an interaction diagram that shows the order of messages that
implement an operation or a transaction. Another type of interaction diagram is the
collaboration diagram. A collaboration diagram is a set of objects related in a particular
context, and interaction, which is a set of messages exchanged among the objects within the
collaboration to achieve a desired outcome. In a collaboration diagram, objects are shown in
figures. As in a sequence diagram, arrows indicate the message sent within the given use case.
In a collaboration diagram, the sequence is indicated by numbering the messages. Some people
argue that numbering the messages makes it more difficult to see the sequence than drawing
the lines on the page. However, since the collaboration diagram is more compressed, other
things can be shown more easily. A collaboration diagram provides several numbering
schemes.
1: Enter loginID
2: Not Valid
: voter C-Verify :
C_Authenticate 4: Caste Vote
3: Valid
C-VProf : C-vinf :
C_View_Profile C_Voting_info
2: Secure
1: Ballot Report
B-Vote : B_Voting
36
Database Manipulation Use Case:
1: Voter information
3: Report
: administrator E-DBinf :
E_Database_info
4: Voter Information
5: Get Database 7: Save updates
B-UseDB : B_Use_Database
1: Voter Information
3: Report
: administrator E-DBinf :
E_Database_info
C-PModfy :
C_Profile_Modify
37
Results Use Case:
2: Not Valid
: voter C-Verify:
C_Authenticate
3: Valid
C-Vprof :
C_View_Profile
38
Voting System Use case:
1: Enter LoginID
2: Not Valid
: voter C-Verify :
C_Authenticate
3: Caste Vote
C-Vinf : : administrator
C_Voting_info
39
12. IDENTIFICATION OF ATTRIBUTES
AND METHODS OF CLASSES
The following questions help in identifying the responsibilities of classes and deciding what
data elements to keep track
Answering the first question help we to identify the attributes of a class. Answering the second
question help us to identify class methods.
State chart diagrams model the dynamic behavior of individual classes or any other
kind of object. They show the sequences of states that an object goes through, the events that
cause a transition from one state to another and the actions that result from a state change.
State chart diagrams are closely related to activity diagrams. The main difference
between the two diagrams is state chart diagrams are state centric, while activity diagrams are
activity centric. A state chart diagram is typically used to model the discrete stages of an
object’s lifetime, whereas an activity diagram is better suited to model the sequence of
activities in a process. Each state represents a named condition during the life of an object
during which it satisfies some condition or waits for some event. A state chart diagram
typically contains one start state and multiple end states. Transitions connect the various
states on the diagram.
The following tools are used on the state chart diagram toolbox to model state chart
diagrams:
Decisions: A decision represents a specific location on state chart diagram where the
workflow may branch based upon guard conditions.
Synchronizations: Synchronizations visually define forks and joins representing parallel
workflow.
Forks and Joins: A fork construct is used to model a single flow of control that divides
into two or more separate, but simultaneous flows. A join consists of two of more flows of
control that unite into a single flow of control.
States: A state represents a condition or situation during the life of an object during which
it satisfies some condition or waits for some event.
Transitions: A state transition indicates that an object in the source state will perform
certain specified actions and enter the destination state when a specified event occurs or
when certain conditions are satisfied.
Start states: A start state (also called an "initial state") explicitly shows the beginning of a
workflow
End States: An end state represents a final or terminal state
43
Class diagrams are more prevalent than object diagrams. Normally you will build
class diagrams plus occasional object diagrams illustrating complicated data structures or
message-passing structures.
Class diagrams contain icons representing classes, interfaces, and their relationships.
We can create one or more class diagrams to depict the classes at the top level of the current
model; such class diagrams are themselves contained by the top level of the current model. We
can also create one or more class diagrams to depict classes contained by each package in your
model; such class diagrams are themselves contained by the package enclosing the classes they
depict; the icons representing logical packages and classes in class diagrams.
Entity class: An entity class models information and associated behavior that is
generally long live.
Boundary Class: They handle the communication between the systems. They can
provide the interface to the user or another system. Ex: Registration form.
Control Class: Control class model sequencing behavior specific to one or more use-
cases. You can think of control class as running or executing the use-case i.e., they
represent the dynamics of the use-case. Ex: Registration Manager.
45
STEREOTYPES AND CLASSES:
A Stereotype provides the capability to create a new kind of modeling element. Some
common stereotypes for a class are Entity, Boundary, Control, Utility and Exception. The
stereotype for a class shown below the class name enclosed in guillemets (<< >>). If desired, a
graphic icon or a specific color may be associated with a stereotype.
DESIGN
An axiom is a fundamental truth that always is observed to be valid and for which
there is no counter example or exception. Suh explains that axioms may be hypothesized from
a large number of observations by noting the common phenomena shared by all cases; they can
not be proven or derived, but they can be invalidated by counter examples or exceptions.
The author has applied Suh’s design axioms to object-oriented design. Axiom 1 deals
with relationships between system components (such as classes, requirements, and software
components), and Axiom 2 deals with complexity of design.
Axiom 1: The independence axiom. Maintain the independence of components.
Axiom 2: The information axiom. Minimize the information content of the design.
Axiom 1 states that, during the design process, as we go from requirements and use
case to a system component, each component must satisfy that requirement without affecting
other requirements.
The UML style guidelines recommend beginning attribute names with a lower-case
letter. In the absence of a multiplicity indicator (array), an attribute holds exactly one value.
Multiplicity may be indicated by placing a multiplicity indicator in brackets after attribute
name. At this stage, we need to add more information to these Methods, such as visibility and
implementation type.
Refining Attributes for the Administrator class:
+ VoterID: Number
+ Ballot info: String
The following operation presentation has been suggested by the UML. The operation syntax is
this:
visibility name: (parameter-list) : return-type-expression
where visibility is one of:
+ public visibility(visibility to all classes)
# protected visibility(accessibility to sub classes and operations of the class).
- private visibility (accessibility only to operations of the class).
Here, name is the name of the operation.
Parameter-list: is a list of parameters, seperated by commas, each specified by name: type-
expression = default value.
Return-type-expression: is a language-dependent specification of the implementation of the
value returned by the method? If return-type is omitted, the operation does not return a value.
Refinement of relationships:
A package groups and manages the modeling elements, such as classes, their
associations and their structures. Packages may be within other packages. A package may
contain both packages and ordinary model elements. The entire system description can be
thought of as a single high-level sub-system package with every thing else in it. All kinds of
UML model elements and diagrams can be organized into packages. Some packages may
contain groups of classes and their relationships, subsystems, or models. A package provides a
hierarchy of different system components and can reference other packages.
1) Database-info:
2) Check-database:
3) Election Process:
4) Election Report:
Component diagrams are created to show components that are the physical
implementation of the system. The component diagram shows the organization and
dependencies among a set of components of the system. The UML notation for a component is
as shown bellow:
Component
Name
The Component diagrams are essentially class diagrams that focus on system’s
components. These are not only important for visualizing, specifying and documenting
component based systems but also for constructing executable systems through forward and
reverse engineering.
1) Authenticate: Represents the source code component for software files c_authenticate and
profile_modify.
2) Profile_manip: Represents the source code component for software file C_Profile_modify.
3) Databse_info: Represents the source code component for software files E-database_info and
b_use _database.
4) Voting_info: Represents the source code component for software files E-candidate, E-
Administrator, c_view_ profile, c_voting_info, c_ballot_info, B_show_
profile, E_voter.
5) Ecommission: represents the source code component for software files B_voting, C_results,
C_Ecommission.
6) Secure_ballot: Represents the source code component for software file C_Ballot_info.
Results
52
The Component diagram of E-Voting system is as follows:
53
20. THE DEPOLYMENT DIAGRAM
Deployment diagrams are created to show the hardware configuration that is used for
the system under the deployment view. The deployment view of architecture involves mapping
software to processing nodes. It shows the configuration of run-time processing elements and
the software processes living on them.
Deployment diagrams shows different nodes along with their connection in the
system and visualizes the distribution of components across the enterprise. Run-time
processing elements are represented as nodes, which are connected by associations indicating
communication paths between them. Software processes are illustrated as text attached to a
node or group of nodes.
This diagram allows the architecture team to understand the system topology and aids
in mapping components to executable processes.
The UML notation for the Processor and the Device is as follows:
Processor Device