Elections in India are conducted almost exclusively using electronic voting machines. These devices are praised for their simple design, ease of use and reliability. Presented here is a demo software that shows how a typical electronic voting machine (EVM) works.
As shown in Fig. 1, an electronic voting machine has two main components: control unit and ballot unit. Control unit is used by polling officers, and it stores and accumulates votes. Ballot unit is placed inside the election booth and used by voters.
Software program of the EVM
Despite design features that make the election software complex to extract the information from the control unit processor, a criminal has a variety of options to steal the information from it. These include decapsulating the chip and examining it under a microscope. Here we did not attempt to extract the software using these methods; once the software is extracted, it is straightforward to reverse-engineer it using standard disassembly tools.
The software (evm.cpp) developed here for the demo is tested on Turbo C++ Version 3.0 IDE. When the user runs the program, it displays a real-time voting machine on the screen with the list of the candidates and corresponding buttons to vote for them (refer Fig. 2). The program requires ‘C’ graphics files such as egavga.bgi, goth.chr, lcom.chr and trip.chr for proper display.
In order to vote for a party, the user has to click the respective button using mouse. A beep sounds to confirm successful submission of vote.
At any point of time if you want to check the status of the votes being polled, just click ‘result’ button in the control panel (not shown here). The next screen will display the percentage of votes received by different candidates in the form of a bar chart. To exit the program, click ‘exit’ button.
Download source code: click here
Main functions
Various functions used in the program are:
- initmouse( ). Initialises the mouse pointer to default position.
- showmouseptr( ). Displays the pointer on the screen.
- restrictmouseptr( ). Restricts the pointer within a particular area of display.
- getmousepos( ). Receives mouse position in terms of coordinates ‘x’ and ‘y’.
- format( ). Creates graphics of the electronic voting machine.
- welcome( ). Displays the welcome message.
- graph( ). Calculates and displays the percentage of votes in favour of different candidates in the form of a graph.
The article was published in July 2012 and has been recently updated. Feel interested? Check out other electronics projects.
Hello sir can anybody help me this project code is not working for me please help me it’s urgent
Hi, the source code is present at the end of the article.
What is the system requirement of the software? It’s not working on my 64-bit laptop.
It only works in Turbo C/C++…
not working in Turbo C++
use code block software