Applicmn hvyufation_Androd_Report (1) R
Applicmn hvyufation_Androd_Report (1) R
PROJECT REPORT
ON
SCIENTIFIC CALCULATOR
FOR
Android Application Development (MCAGC 3001)
SUBMITTED BY
MASOOM AHMAD- SOM23MCA041
IRFAN PATHAN-SOM23MCA050
SUBMITTED TO
D. Y. PATIL UNIVERSITY
SCHOOL OF MANAGEMENT, PUNE
AMBI MASTER OF COMPUTER
APPLICATION
2023-24
1
Ref No: DYPSOM/MCA Date:
Certificate
Examined by:
Examiner 1
Examiner 2
2
Declaration
Date: Place:
3
Table of Content
SR. NO. TITLE PAGE NO.
1 INTRODUCTION 5 – 13
1.1 EXISTING SYSTEM AND NEED OF SYSTEM 5–7
1.2 SCOPE OF WORK 7–9
1.3 OPERATING ENVIRONMENT – HARDWARE AND 9
SOFTWARE
1.4 DESCRIPTION OF TECHNOLGY USED 10 – 13
2 PROPOSED SYSTEM 14 – 19
2.1 PROPOSED SYSTEM 14 – 15
2.2 OBJECTIVE OF SYSTEM 15 – 16
2.3 FEASIBILITY STUDY 16 – 17
2.4 USER REQUIREMENTS 17 – 19
4 USER MANUAL 55 – 56
4.1 USER MANUAL 55
4.2 PROGRAM SPECIFICATIONS / FLOW CHARTS 56
4
1. INTRODUCATION
5
Need for the System:
The need for an online voting system arises from several challenges in
traditional voting systems and the need to modernize the voting process. A
well-designed online voting system can address many of these challenges,
providing a more efficient, secure, and accessible platform for voters.
3. Security:
Encryption and Data Security: Modern security techniques like
end-to-end encryption can ensure that votes remain confidential and
tamper-proof.
Authentication and Identity Verification: Secure login and
biometric authentication I’D Card and Voter I’D Card can be used to
ensure only eligible voters participate.
6
Fraud Prevention: Strong security measures can prevent duplicate
voting, identity theft, and tampering with results.
4. Cost-effective:
Reduced Operational Costs: No need for physical voting booths,
paper ballots, or election staff. This reduces the overall cost of
conducting an election.
Environmental Benefits: Reduces paper usage and the need for
transportation of voting materials.
SCOPE OF WORK
TheVoting System Android Project aims to create a secure and user-
friendly mobile application that enables voters to cast their votes
electronically in elections. By leveraging Android technology, the system
will provide a convenient platform for user registration, secure
authentication, anonymous voting, and real-time vote tallying. The project
will focus on data privacy, fraud prevention, and scalability, ensuring a
seamless and transparent voting experience for both users and
administrators.
The Online Voting System is built with a comprehensive suite of security
features to protect voter data, maintain the integrity of the voting process,
7
and ensure a secure and transparent environment for all stakeholders
involved.
One of the key security features is multi-factor authentication (MFA). This
ensures that users - whether they are voters or administrators - cannot
access the system with just a username and password. Instead, additional
layers of authentication are required, such as One-Time Passwords This
makes it significantly harder for unauthorized users to gain access to the
system, adding an essential layer of protection.
In addition, the system uses secure session management to prevent
unauthorized access during periods of user inactivity. Session tokens are
used to keep users logged in during the voting process, but these tokens are
automatically invalidated after a set period of inactivity and secure storage
of session tokens on the user’s device ensures that they cannot be easily
intercepted or extracted.
Voter Registration and Authentication system ensures that only eligible
voters can participate in the election by requiring secure registration.
Voters can register through personal identification documents or
authentication methods like biometric data (fingerprint or facial
recognition).
2. Voting Process
Election Listings: Display available automatically Change
elections for eligible voters based on their profile national
elections, corporate voting.
Vote Casting: Voters select candidates or voting options and
submit their votes.
8
Vote Confirmation: Once a vote is cast, users will receive a
confirmation of their vote with a receipt or confirmation number.
Vote Modification: Users can modify their votes before the
election deadline if required.
3. Administrator Features
Admin Panel: Admins will have access to a secure web interface
to manage elections, set deadlines, add candidates, and monitor
voter participation.
Election Management: Admins can create, manage, and delete
elections, define candidate options, and monitor voting progress.
Real-Time Vote Monitoring: Admins can view live statistics,
track vote submissions, and see results in real time.
Hardware Requirements -
Processor: Pentium i3 multi-core processor
Hard disk: 256GB
RAM: 8GB
Software Requirements -
Client-Side Software –
Java Programming Language.
Android Studio Flamingo
Server-Side Software
–
Language: Java 11, Android (2022.2.1)
Web Server: Firebase Version: 32.x.x
9
DESCRIPTION OF TECHNOLGY USED
Android Studio:
An Android-based voting system involves several key components to
ensure a smooth and secure voting experience. The user interface (UI)
consists of screens for login, registration, voting, and result confirmation,
where users can sign in, register, cast their votes, and view results.
Authentication is typically handled via Firebase Authentication or custom
solutions to ensure that only registered users can vote. Once logged in, the
voting screen presents options for users to select from, and upon voting,
the vote is submitted to the backend via an API. The backend is
responsible for processing the vote, ensuring vote integrity (such as
preventing multiple votes from the same user), and updating the vote
counts in real-time. Firebase Realtime Database or Cloud Fire store is
commonly used to store voting data and synchronize updates across
devices instantly. Admin dashboards allow authorized users to monitor the
voting process and access aggregated results, ensuring transparency and
real-time feedback. Finally, security measures like SSL/TLS encryption
and data validation are essential to protect user data and prevent tampering
with the votes. By integrating these components, an Android-based online
voting system can efficiently handle user interactions, secure voting data,
and deliver accurate results in real time.
Java:
Java was developed by James Gosling and his team at Sun Microsystems
in the early 1990s under the name Oak. Initially designed for interactive
television, Oak was renamed Java in 1994, symbolizing simplicity, power,
and platform independence. Java was officially released in 1995, with its
promise of "write once, run anywhere", allowing programs to run on any
device with a compatible Java Virtual Machine (JVM). Over the next few
years, Java gained significant traction, particularly with the release of Java
2 in 1998, which split the platform into J2SE, J2EE, and J2ME for
desktop, enterprise, and mobile applications, respectively. Java's major
milestone came in 2004 with the release of Java 5 (or Java 1.5),
introducing key features like generics, metadata annotations, and enhanced
for-loops that modernized the language.
10
In 2009, Oracle Corporation acquired Sun Microsystems, taking control of
Java. This acquisition led to changes in Java’s development and licensing
model. Major releases continued with Java 7 (2011) and Java 8 (2014),
with Java 8 introducing lambda expressions and the Stream API, marking a
shift toward functional programming features. In 2017, Java adopted a six-
month release cycle, ensuring regular updates and faster innovation. Java 9
(2017) introduced the Java Platform Module System (JPMS), while Java
17 (2021) became the latest long-term support (LTS) version. Java
continues to evolve with regular updates that focus on performance,
security, and scalability, maintaining its position as one of the world’s
most widely used programming languages, especially in enterprise
environments, mobile apps (Android), and large-scale systems.
11
functional system that handles user input, processes data, and
communicates with remote servers or databases.
Firebase:
Firebase, originally founded in 2011 and acquired by Google in 2014, has
evolved into a powerful platform for building mobile and web
applications. Initially, Firebase offered a real-time database that made it
easier to synchronize data across client devices in real time. After its
acquisition, Firebase expanded its offerings and now provides a
comprehensive suite of tools for app development, including Firebase
Realtime Database, Cloud Fire store, Firebase Authentication, Firebase
Cloud Messaging, Firebase Storage, and more. These tools are designed to
simplify backend management, reduce development time, and provide
scalable, secure solutions for mobile apps.
12
Storage for storing and serving user-generated content such as images and
videos.
Overall, Firebase's suite of tools has become a go-to solution for Android
developers, providing a seamless backend infrastructure for data
management, real-time updates, user authentication, and more. Its ease of
use and integration with Android Studio make it an essential tool for
building scalable, reliable, and real-time applications without the need for
extensive server-side development.
13
2. PROPOSED SYSTEM
PROPOSED SYSTEM
In the proposed Android-based Voting System, various modulesserve
distinct roles to manage the voting process effectively. These modules
will ensure a seamless experience for users, administrators and the
system itself. The core modules in the system include:
Voting Module.
Authentication and User Management Module.
Admin Module (Faculty Module).
Each module interacts with Firebase for backend data management,
ensuring real-time data synchronization, secure authentication, and easy
handling of data.
1. Voting Module
The Voting Module is the core component where users (voters) interact
with the system. This module allows voters to cast their votes and see
available options or candidates for the current election. Here’s how it
works:
User Authentication: Voters must first log in through the
Authentication Module, which verifies their identity via Firebase
Authentication (e.g., using email/password, social login, or
phone number).
Displaying Voting Options: Once authenticated, voters can view
the list of election candidates or options using Radio Buttons,
Check Boxes, or custom UI elements in Voting Activity.
Voting Process: Voters select their preferred candidates or options
and submit their vote. The app uses Firebase's Realtime Database
or Cloud Fire store to store the votes in real time.
Real-time Updates: Once a vote is cast, the system updates the vote
counts and reflects the changes in real time on all connected devices,
ensuring that the process is transparent and dynamic.
14
2. Authentication and User Management Module
Authentication is crucial to ensure that only authorized users can vote.
The Authentication Module allows users to sign up, sign in, and securely
manage their accounts. Firebase Authentication is typically used for this
purpose:
User Sign-In: Voters can sign in using their email, Google account,
or phone number.
Role Management: Admin users have elevated privileges, allowing
them to manage elections and voters.
OBJECTIVE OF SYSTEM
The Online Voting System is designed to provide a secure, efficient,
and user-friendly solution for conducting elections.
It ensures secure user authentication through Firebase, allowing
only authorized users to participate in voting.
The system features a simple, intuitive interface for
voters, streamlining the voting process.
15
With real-time vote recording and results, the system ensures that
vote counts are updated instantly.
An Admin Module gives administrators full control to manage
elections, monitor voting progress, and configure election settings.
The system also includes a Result and Report Generation feature that
aggregates votes in real-time and allows the export of results in CSV
or PDF formats.
To guarantee data security and voter privacy, the system uses
Firebase’s encryption and authentication methods.
It is scalable, capable of handling elections with large voter pools
and multiple candidates or options.
Administrators can control the voting period, specifying start and
end times for elections to ensure the integrity of the voting window.
The system prioritizes transparency, offering clear, visual results that
enhance trust in the election process.
Lastly, it is flexible, supporting various types of elections, such as
class votes, corporate elections, or public referendums.
FEASIBILITY STUDY
1. Technical Feasibility:
The system uses Android Studio for development, Firebase for backend
services (authentication, real-time database), and is compatible with
Android devices (version 5.0).
Firebase provides secure data storage, real-time synchronization, and
scalability, ensuring smooth performance for large elections.
2. Economic Feasibility:
Development costs are low, with free tools (Android Studio) and
Firebase's free tier for small-scale use.
Operational costs increase with larger elections but remain affordable due
to Firebase's flexible pricing.
Potential revenue generation from premium features, election management
services, and licensing.
16
3. Operational Feasibility:
The system offers an easy-to-use interface for voters and a robust Admin
Panel for election management.
Firebase ensures data security and privacy, with scalability to handle large
elections.
The system is flexible, adaptable for various election types, and complies
with privacy regulations like GDPR. is General Data Protection
Regulation.
USER REQUIREMENTS
1. Voter Requirements
Secure Authentication: Voters must be able to register and log in
securely using Firebase Authentication (email/password, phone
number, or social media accounts).
User-Friendly Interface: The system should have a simple,
intuitive interface that allows voters to easily navigate between
screens (login, voting, result viewing).
Real-Time Voting: Voters should be able to cast their vote in real-
time and receive immediate feedback on successful submission.
Anonymity: Voters should be assured that their votes are
anonymous and cannot be traced back to them after submission.
Voting Confirmation: After submitting their vote, voters should
receive a confirmation message or notification indicating that their
vote has been successfully recorded.
Vote Options: Voters should be presented with clear voting options
(e.g., Radio Buttons for single-choice elections, Check Boxes for
multiple-choice elections).
Accessibility: The app should be accessible to users with
disabilities, with features like screen readers and large text options.
17
2. Administrator Requirements
Election Management: Admins must be able to create, edit, and
manage elections, including adding candidates, setting election
dates, and defining voting options.
Voter Management: Admins should be able to manage the voter
list, including adding or removing eligible voters, and ensuring only
authorized individuals can participate.
Real-Time Results Monitoring: Admins must have access to real-
time vote counts and updates as votes are cast. The system should
display voting progress on a dashboard.
User Roles and Permissions: Admins should be able to define
different roles (e.g., regular users, super admins) with varying levels
of access to sensitive data and election management functions.
Election Security: Admins must have access to a secure control
panel, with two-factor authentication for login and encrypted data
storage to ensure the integrity of the election.
3. System Requirements
Real-Time Data Sync: The system must use Firebase Realtime
Database or Fire store to synchronize votes in real-time across all
devices.
Secure Data Storage: Voter data, votes, and election details must be
stored securely using Firebase's encryption and data protection
methods.
Scalability: The system should be scalable to support elections with
a varying number of voters, from small-scale elections to larger,
public elections.
Cross-Platform Compatibility: The app should be compatible with
Android devices running versions 5.0 and above, ensuring
accessibility for a broad user base.
Compliance with Legal Regulations: The system must comply
with privacy laws like GDPR and data protection regulations to
ensure voter data is protected.
18
4. Reporting and Transparency
Election Transparency: Voters should have access to view the
results of the election in real-time after the voting period has ended.
5. Security Requirements
Data Encryption: All data transmission (such as login credentials
and votes) should be encrypted using industry-standard protocols.
Login Security: Users must log in securely using multi-factor
authentication where necessary to ensure account security.
Authorization Control: The system must ensure that only
authorized administrators can make changes to election settings or
access sensitive data.
19
3. ANALYSIS AND DESIGN
OBJECT DIAGRAM
o Admin Module:
1 3
Admin Module (Register) 2 Login
+Email_ID= [email protected] Register As Voter Account
+Password= ******* +Enter_First_Name= Prithviraj +Email_ID= [email protected]
+Enter_Last_Name= Devkar +Password= *******
+Radio_Button= Male / Female /
Other
+Enter_Adhar_Number=
265515312926
+Date_Of_Birth= 17/03/2002
+Add_Adharcard_Image= Click
Return Login and
Login As Voter / Login As Election
Candidate Government ID
Insert
+Enter_First_Name= Prithviraj
+Enter_Last_Name= Devkar 4
+Radio_Button= Male / Female / Login Account
Other
Login as
6 +Email_ID=
+Enter_Adhar_Number= Election [email protected]
265515312926 5 Commissio
n Authority +Password= eac123
+Date_Of_Birth= 17/03/2002
7
Create
Election
9 Calculate result
of ongoing
election Review Voter Details / 11
8 10 Review Candidate Details
13 15
Current
Election
Add 12 View
Election Past Log Out
+Election_name= BJP +First Name= Prithviraj
Electio
+Las Name= Devkar
n
20
+Election_Start_Date= +Adhar Number=265515312926
20/11/2024 +Gender= Male 14
+Election_End_Dtae= +DOB= 17/03/2002
Declare Result
21/11/2024 Enter Reason of Declaration =
Yes/No
21
o Faculty Module:
Register As Voter Login As Voter / Login as Election Candidate
+Enter_First_Name= Prithviraj
+Enter_Last_Name= Devkar +Enter_First_Name= Prithviraj
+Radio_Button= Male / Female / Other +Enter_Last_Name= Devkar
+Enter_Adhar_Number= 265515312926 +Radio_Button= Male / Female / Other
+Date_Of_Birth= 17/03/2002 +Enter_Adhar_Number= 265515312926
+Add_Adharcard_Image= Click +Date_Of_Birth= 17/03/2002
+Add_Adharcard_Image= Click
1
Facult
1
y
* Login as Election Commission Authority
+Email_ID= [email protected]
+Password= eac123
1 1
22
CLASS DIAGRAM
o Faculty Module:
1 +Declare Result
1 1
Facult
y 1
1
+Email_ID
+Password
+Login_as_Election_Commission_Authori
ty()
1
Add Election
+Election Name() Review Voter / Review
Calculate result of Candidate
+Election_Start_Da ongoing election
te +Current Election +First Name()
+Election_End_Dta +Las Name()
+Adhar Number()
+Gender()
+DOB
+Enter Reason of Declaration
23
USE CASE DIAGRAM
o Overall Project Use Case:
Login
Register Voters
Add Election
Calculate Result
24
o Admin Module:
Login
Register
Enter First
Name
Admi Date of
n
Gender
25
o Faculty Module:
<<Include>>
Login
Authenticate Register
Register as Voter
Login As Voter
Create Election
Facult
y
Calculate result of ongoing election
Current Election
Declare Result
26
SEQUENCE DIAGRAM
o Registration:
6: Add Voters ()
7: Display User ()
X X X X
27
o Registration Voters:
Ctrl: RegistrationCtrl:
UI: Registration Form Voter’s Data
Controller
Admin
Login
1: Add Details ()
2: Submit ()
3: Validate Details ()
4: Valid Votes ()
5: Display Votes ()
6: Invalid Votes ()
8: Return Add Votes () 7: Failure Votes ()
X
X X
X
28
o Election Commission Authority:
Ctrl: Create
Faculty UI: Election Commission Election
Ctrl: Calculate resu
Authority
1: Add Vote ()
2: Submit ()
3: Validate Details ()
4: Current Votes ()
5: Display Votes ()
6: Invalid Votes ()
8: Return Add Votes () 7: Failure Votes ()
X
X X
X
29
o Review Voter Details:
Add Details ()
2: Submit ()
3: Election Result
4: Back Menu
5: Log Out
X
X X
X
30
ACTIVITY DIAGRAM
o Admin Module – Register as Voter
Register
No
Valid
Yes
Register As Voter
Register As Election
Candidate
31
o Admin Module – Login Voters
Login
No
Valid
Yes
Login as Voter
32
o Faculty Module:
Login
No
Valid
Yes
Login as Login as
Voter Login as
Election
Election
Commission
Candidate
Authority
Enter Details 1
Party Name Create
6 Electio
n
2
Logou
t
Calculat
Enter e Result
First Radi
of
Name o
Ongoing
Butto
election
n
3
Enter Last
Enter
Name Adhar
Numbe
r
5
33
Review Voter Details
4
Review Candidate Details
34
MODULE HIERARCHY DIAGRAM
Admin
Register
Login
Login As Election
Candidate
Create Election
Logout
35
COMPONENT DIAGRAM
User Interface
Android Studio
Firebase Database
36
DEPLOYMENT DIAGRAM
Client Machine
Web Browser
Web Server
Software
Online Voting System
37
MODULE SPECIFICATIONS
o Admin Module:
1. Overview of election statistics:
Number of ongoing elections.
Total voters and candidates registered.
Results overview (if available).
Navigation links to manage elections, voters, and candidates.
2. Login Panel:
Login as Voter.
Login as Election Candidate.
Login as Commission Authority (Admin).
Role-based access control for functionalities.
Secure authentication using:
Username/Email
Password (hashed and stored securely)
3. Register Panel:
Voter Registration:
o Input fields: Name, Age, Gender, Address,
ID proof (e.g., Aadhaar, Voter ID).
o Email/Phone verification.
Candidate Registration:
Input fields: Name, Party Affiliation, Manifesto Upload, ID
Proof. Approval required by Admin. Data stored securely in
respective tables.
4. Manage Elections:
Create, view, update, or delete elections.
Parameters:
o Election Name.
o Start and End Date.
o Allowed voter and candidate groups.
o Positions (e.g., President, Secretary).
o Publish election details to voters and candidates.
38
5. Review Voter Details:
View registered voters.
Approve or reject voter accounts.
Update voter profiles if corrections are needed.
Block voter accounts in case of malpractice.
6. Review Candidate Details
View candidate applications.
Approve or reject candidate participation.
Update candidate profiles if necessary.
7. Calculate Results
Real-time result calculation:
View the number of votes each candidate has received.
Publish the results to voters and candidates after
election closure.
8. Logout
Secure logout mechanism to prevent session hijacking.
Redirect to login screen upon logout.
o Faculty
Module: 1.
Login Panel
Login as Faculty:
o Faculty members can securely log in using their
credentials (e.g., email/username and password).
o Role-based access control ensures that faculty can only
access functionalities assigned to their role.
Registration (Optional):
o Faculty members can self-register by providing personal
details (e.g., name, email, department) and await
approval from the Admin or Commission Authority.
o Alternatively, Admin/Commission Authority can pre-
register faculty accounts to streamline the process.
2. Dashboard
Faculty can view an overview of:
o Ongoing Elections: Display active elections they
are monitoring or assisting with.
39
o Student Voter Participation Rate: Statistics on the number
of students registered vs. those who have cast votes.
o Faculty-Specific Tasks: A task list related to their role in
the election process, such as resolving voter issues or
verifying nominations.
3. Election
Management
Monitor Elections:
o Faculty members assist in ensuring the integrity and
smooth functioning of elections.
o They can monitor vote counts, report anomalies, and
confirm adherence to election guidelines.
Facilitate Student Participation:
o Encourage student voters to participate by sending
reminders or providing clarification on voting processes.
o Help resolve minor issues such as password recovery or
login problems.
Nomination Verification (Optional):
o If assigned, faculty can verify and approve the credentials
and eligibility of candidates before their nomination is
finalized.
4. Report Issues
Faculty can report problems encountered during the
election process, such as:
o Technical Issues: System errors, login failures, or
data inconsistencies.
o Misconduct: Cases of voter or candidate malpractices.
Reports are submitted directly to the Election
Commission Authority for review and resolution.
40
o Analysis of student engagement.
41
6. Logout:
Faculty can securely log out of the system, ensuring their
session is terminated to prevent unauthorized access.
They are redirected to the login screen after logging out.
o Registration Screen:
42
o Register As Voter Screen:
43
o Register As Election Candidate Screen:
44
o Login Screen:
45
o Login As Voter Screen:
46
o Login As Election Candidate Screen:
47
o Login As Election Commission Authority:
48
Create Election Screen:
49
Calculate Result of Ongoing Election Screen:
50
Review Voters Details Screen:
51
Review Candidate Details Screen:
52
View Past Election Screen:
53
Logout:
54
TEST PROCEDURES AND IMPLEMENTATION
o Testing: The Online Voting System developed in Android Studio
undergoes a comprehensive testing process to ensure reliability,
security, and usability. The testing begins with Unit Testing, focusing
on individual components such as the login page, registration form,
and voting interface, ensuring they function correctly and are free of
errors. This phase also validates backend API calls to ensure proper
communication between the app and the server, enabling smooth data
retrieval and vote submission. Following this, Integration Testing
ensures seamless interaction between different modules, verifying
processes like login authentication, navigation to the dashboard, and
accurate recording of votes in the database.
This rigorous testing process ensures the Online Voting System built
in Android Studio is robust, secure, and ready for deployment.
55
The testing process proceeds with Unit Testing, which focuses on
individual components such as login, registration, and voting features,
ensuring they work as intended. This is followed by Integration
Testing, where interactions between modules are validated to confirm
seamless communication, such as successful login navigation or
accurate vote recording. System Testing evaluates the application as a
whole, checking its performance under high traffic and verifying data
security. Finally, User Acceptance Testing (UAT) is conducted with
real users to ensure the app meets their needs and expectations. This
comprehensive methodology ensures a robust, secure, and user-
friendly Online Voting System ready for deployment.
o Implementation:
The implementation of the Online Voting System in Android Studio
involves a structured process to develop a functional, secure, and user-
friendly application. It begins with Requirement Gathering and
Analysis, where the objectives, functionalities, and user roles (voter,
candidate, admin) are clearly defined. This is followed by System
Design, which includes creating wireframes for the user interface and
designing the backend architecture, database schema, and API
endpoints.
56
In the Post-Deployment Phase, the app is monitored for performance
and bugs, with regular updates issued to enhance features and address
user feedback. Clear user documentation is provided to guide voters,
candidates, and administrators, ensuring seamless adoption of the
system. This structured implementation ensures the successful delivery
of a robust and efficient Online Voting System.
57
4. USER MANUAL
User
Manual:
o The User Manual for the Online Voting System provides
essential instructions for using the application effectively. It
covers the process for Voters, Candidates, and Admins,
detailing how to register, log in, cast votes, monitor election
results, and manage elections. Voters can securely cast their
vote and view election outcomes, while candidates can track
results and monitor their candidacy status. Admins have the
ability to manage elections, review user registrations, and
access election results. Troubleshooting tips are included to
help users resolve common issues, with contact information
provided for further support. This manual ensures a seamless
and efficient experience for all users.
o The User Manual for the Online Voting System provides step-
by-step instructions for all users Voters, Candidates, and
Admins ensuring a seamless experience. Voters can easily
register, log in, cast their vote, and view election results, while
Candidates can track their nominations and results. Admins
manage the elections, review user registrations, and oversee
the entire voting process. Troubleshooting guidance is
included for common issues, and users can reach support
through email, phone, or live chat for further assistance. This
guide ensures that users can navigate the system effectively,
promoting transparency and efficiency in the online voting
process.
59
Flow Chart:
60
5. DRAWBACKS AND LIMITATIONS
61
6. PROPOSED ENHANCEMENTS
PROPOSED ENHANCEMENTS:
Implement multi-factor authentication (MFA) with biometric
verification (fingerprint/face recognition) and OTP verification to
ensure voter identity and prevent fraud.
Use end-to-end encryption to secure voter data and communication,
ensuring that votes cannot be intercepted or tampered with.
Design a user-friendly interface with larger fonts, colour contrast
options, and intuitive navigation to ensure ease of use for all users,
including those with disabilities.
Implement offline voting capabilities or low-bandwidth modes for users
in areas with limited internet access.
62
7. CONCLUSIONS
CONCLUSIONS:
Ensuring the protection of voter data through encryption and secure
authentication methods to prevent fraud and hacking.
Focusing on creating an intuitive, user-friendly interface that
is accessible to all voters, including those with disabilities.
Designing the system to handle a large number of users efficiently
during peak voting periods without performance degradation.
Ensuring the system complies with election laws and regulations,
maintaining transparency, and preventing election manipulation.
Managing the development, deployment, and ongoing maintenance
costs to ensure the system remains functional and secure over time.
Building public confidence in the system through transparency, clear
voting processes, and ensuring the system’s reliability and integrity.
63
8. BIBLIOGRAPHY
Website:
https://www.google.com/
https://www.w3schools.com/
https://www.geeksforgeeks.org/
https://www.javatpoint.com/
https://www.youtube.com/
https://www.codeproject.com/
64
9. ANNEXURE
SAMPLE PROGRAM CODE:
package com.example.onlinevotingsystem;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import
androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.gms.tasks.OnFailureListener;
65
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
import java.io.File;
66
private Button goBackToInfoPage;
private static final int REQUEST_CODE_FILES = 1;
private Uri file;
private DatabaseReference dbRef;
private StorageReference storageRef;
private FirebaseUser user;
private UploadTask
uploadTask; private int count =
0;
private LinearLayout cardView;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
user = FirebaseAuth.getInstance().getCurrentUser();
storageRef = FirebaseStorage.getInstance().getReference();
dbRef = FirebaseDatabase.getInstance().getReference();
if(user != null){
uid = user.getUid();
}
setContentView(R.layout.activity_main);
submitBtn =
findViewById(R.id.submitBtn);
goBackToInfoPage = findViewById(R.id.goBackToInfoPage);
firstName = findViewById(R.id.firstName);
lastName = findViewById(R.id.lastName);
aadharNumber = findViewById(R.id.aadharNumber);
67
genderMale = findViewById(R.id.male);
68
genderFemale = findViewById(R.id.female);
genderOthers = findViewById(R.id.others);
datePicker = findViewById(R.id.datePicker);
chooseFileBtn = findViewById(R.id.chooseFileBtn);
genderGrp = findViewById(R.id.genderGrp);
cardView = findViewById(R.id.uploadVoter);
try{
DatabaseReference subDbRef = dbRef.child("user-
data").child(uid);
//Toast.makeText(getApplicationContext(),subDbRef.toString(),Toast.LE
NGTH_LONG).show();
subDbRef.addValueEventListener(new ValueEventListener() {
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void onDataChange(@NonNull DataSnapshot snapshot)
{
//Toast.makeText(getApplicationContext(),snapshot.child("hasSubmitted")
.getValue().toString(),Toast.LENGTH_LONG).show();
if(snapshot.hasChild("hasSubmitted")){
if(snapshot.child("hasSubmitted").getValue().toString().equals("true")){
String fName =
snapshot.child("fName").getValue().toString();
String lName =
snapshot.child("lName").getValue().toString();
String dob = snapshot.child("dob").getValue().toString();
69
String aadharNum =
snapshot.child("aadharNum").getValue().toString();
String gender =
snapshot.child("gender").getValue().toString();
firstName.setText(fName)
;
lastName.setText(lName);
genderGrp.clearCheck();
if(gender.equals("male"))genderMale.setChecked(true);
else
if(gender.equals("female"))genderFemale.setChecked(true);
else genderOthers.setChecked(true);
aadharNumber.setText(aadharNum);
datePicker.updateDate(2000,11,24);
goBackToInfoPage.setVisibility(View.VISIBLE);
}
}
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
Toast.makeText(getApplicationContext(),error.getMessage(),Toast.LENG
TH_LONG).show();
}
});
}catch(Exception e){
70
Toast.makeText(getApplicationContext(),e.getMessage(),Toast.LENGTH
_LONG).show();
}
chooseFileBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setType("/");
intent.setAction(ACTION_GET_CONTENT);
startActivityForResult(createChooser(intent, "Select
File"), REQUEST_CODE_FILES);
}
});
submitBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String fName =
firstName.getText().toString(); String lName =
lastName.getText().toString();
String aadharNum = aadharNumber.getText().toString();
String gender = null;
if(genderMale.isChecked())gender = "male";
else if(genderFemale.isChecked())gender =
"female"; else gender ="others";
int day = datePicker.getDayOfMonth();
71
int month = datePicker.getMonth();
72
int year = datePicker.getYear();
String dob = String.valueOf(day)
+"/"+String.valueOf(month+1)+"/"+String.valueOf(ye ar);
if(fName.trim().equals("")){
Toast.makeText(getApplicationContext(),"First Name Cannot
Be
Empty",Toast.LENGTH_LON
G).show(); return;
}
else if(lName.trim().equals("")){
Toast.makeText(getApplicationContext(),"Last Name Cannot
Be
Empty",Toast.LENGTH_LON
G).show(); return;
}
else if(fName.trim().contains("12")){
Toast.makeText(getApplicationContext(),"First Name cannot
have a number",Toast.LENGTH_LONG).show();
return;
}
else if(lName.trim().contains("12")){
Toast.makeText(getApplicationContext(),"Last Name cannot
have a number",Toast.LENGTH_LONG).show();
return;
}
else if(fName.trim().contains("\"")){
Toast.makeText(getApplicationContext(),"First Name cannot
73
have \"",Toast.LENGTH_LONG).show();
74
return;
}
else if(lName.trim().contains("\"")){
Toast.makeText(getApplicationContext(),"Last Name cannot
have \"",Toast.LENGTH_LONG).show();
return;
}
else if(aadharNum.trim().length() != 12){
Toast.makeText(getApplicationContext(),"Aadhar Number
must be a 12 digit number",Toast.LENGTH_LONG).show();
return;
}else{
User curUser = new
User(fName,lName,gender,dob,aadharNum,"true","false","",uid);
dbRef.child("user-
data").child(uid).setValue(curUser).addOnSuccessListener(new
OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Toast.makeText(getApplicationContext(),"Submitted
Sucessfully! Under Review!",Toast.LENGTH_LONG).show();
startActivity(new
Intent(getApplicationContext(),InfoActivity.class));
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
75
Toast.makeText(getApplicationContext(),e.getMessage(),Toast.LENGTH
_LONG).show();
}
});
}
}
});
// initialising all views through id defined above
goBackToInfoPage.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v) {
startActivity(new
Intent(getApplicationContext(),InfoActivity.class));
}
});
}
76
uploadTask = (UploadTask)
upload.putFile(file).addOnSuccessListener(new
OnSuccessListener<UploadTask.TaskSnapshot>()
{
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
Toast.makeText(MainActivity.this, "Aadhar Image Upload
Successfully!", Toast.LENGTH_SHORT).show();
cardView.setVisibility(View.GONE);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(MainActivity.this, e.getMessage(),
Toast.LENGTH_SHORT).show();
cardView.setVisibility(View.GONE);
}
});
}
78