How himanshukumar8/e-voting-system works
Main Components
• User Interface Components – These are implied by the screenshots:
• Voter Login Page
• Candidate Login & Confirmation Pages
• Admin Login and Administration Pages
• Poll pages (start, current, and previous poll views)
• Application’s Business Logic – This is primarily implemented in vote.cpp and includes:
• Authentication/Authorization mechanism (distinguishing between regular voters, candidates, and admin)
• Voting process logic (casting/voting and poll management)
• Use of OOP techniques (classes for Voter, Candidate, Admin, etc.) that interact via inheritance, polymorphism, and abstract interfaces.
• Data Management/Storage Component – Represented by file handling with the CSV files:
• Candidate.csv, Polls.csv, and Voter.csv, storing and updating representative data.
Relationships and Interactions
• The User Interface interacts with the Business Logic to send user inputs such as login credentials, vote selections, and administrative commands.
• The Business Logic uses OOP classes (with inheritance and polymorphism) to manage application state and implements the voting and authentication processes.
• The Data Management component acts as the persistence layer. It reads from and writes to the CSV files to save voter, candidate, and poll data.
• Flows (through the UI) reflect system state changes, particularly in the admin and confirmation screens.
Architectural Patterns and Design Principles
• Presentation Layer (UI Screens and User Interaction)
• Business Logic Layer (Core voting and authentication logic implemented via classes)
• Data Persistence Layer (File handling with CSVs)
• Inheritance: Showcase how the Admin may inherit from a User base class, or how the Voter and Candidate classes share common operations.
• Polymorphism: Indicate functions that exhibit overloading and overriding.
• Abstract Classes/Interfaces: Point out any abstract definitions that guide different implementations.
• File Handling Integration – Represent the CSV files as external data stores.