A simple Java Swing application for managing polls and votes, designed as a college project.
- User Management: Registration, login, and role-based access (Admin/User)
- Poll Creation: Admins can create polls with multiple options
- Voting System: Users can vote once per poll
- Results Display: View vote counts and simple bar charts
- File Storage: Data persisted using Java serialization (no database required)
Java CIAP/
├── votesystem/
│ ├── VoteManagementSystem.java # Main application class
│ ├── models/ # Data models
│ │ ├── User.java
│ │ ├── Poll.java
│ │ └── Vote.java
│ ├── services/ # Business logic
│ │ └── DataService.java
│ └── ui/ # User interface
│ ├── LoginFrame.java
│ ├── DashboardFrame.java
│ ├── CreatePollFrame.java
│ ├── VotingFrame.java
│ └── ResultsFrame.java
├── run.bat # Windows batch file to run
├── README.md # Project documentation
└── data/ # Data files (auto-created)
├── users.dat
├── polls.dat
└── votes.dat
- Double-click the
run.bat
file in the project root (Windows only) - This will compile and run the application automatically
- Open terminal/command prompt
- Navigate to the project directory (
Java CIAP
) - Compile:
javac -d . votesystem/**/*.java
- Run:
java votesystem.VoteManagementSystem
- Import the project into your Java IDE (Eclipse, IntelliJ, VS Code)
- Run the
VoteManagementSystem.java
main class from thevotesystem
package
- Username: admin
- Password: admin
- Role: Administrator
- Login: Use your credentials or register a new account
- View Polls: See all active polls on the dashboard
- Vote: Double-click a poll or select it and click "Vote"
- View Results: Select a poll and click "View Results"
- Create Polls: Click "Create Poll" to add new polls
- Manage Polls: View all polls and their status
- Monitor Results: Check voting progress and results
- Java 8 or higher
- No additional dependencies required (uses only built-in Java libraries)
- UI Framework: Java Swing (built into Java)
- Data Storage: Java Serialization to .dat files
- Architecture: Simple MVC pattern
- Security: Basic password validation (suitable for college project)
✅ User registration and login
✅ Admin and regular user roles
✅ Poll creation with multiple options
✅ Voting system with duplicate prevention
✅ Results display with charts
✅ File-based data persistence
✅ Clean, user-friendly interface
- Start the application
- Login with
admin/admin
- Create a new poll (e.g., "Favorite Programming Language")
- Add options (Java, Python, C++, JavaScript)
- Logout and register as a regular user
- Login as the new user and vote
- View results to see the vote count and chart
- Pure Java: Uses only standard Java libraries (no external dependencies)
- Simple Design: Easy to understand and modify
- File-based: No database setup required
- Portable: Runs on any system with Java installed
- Educational: Demonstrates basic Java concepts like OOP, Swing, and file I/O
- Add poll expiration dates
- Implement password encryption
- Add export functionality for results
- Multiple choice voting
- User profile management
- Poll categories
Author: Hamza Memon
Language: Java
Framework: Swing
Year: 2025