Design a smart contract for a decentralized voting application on the blockchain. The system allows a predefined list of candidates and enables registered voters to cast their vote only once.
Votes must be recorded immutably on the blockchain, ensuring transparency and preventing tampering. Voting period is restricted to a specific timeframe, after which the contract automatically tallies and declares the results.
Key Features:
- Only registered voters can participate; each voter can vote only once.
- Voting is allowed only within a specific start and end time.
- Votes are stored transparently and immutably on the blockchain.
- After voting ends, the smart contract counts votes and declares the winner.
- The process is trustless and verifiable by anyone.
Note: Write the code on Remix IDE in Solidity for the Ethereum blockchain.