InQuiz is a sophisticated desktop quiz application built with Java Swing, designed to provide an engaging and interactive learning experience. The application features a modern, user-friendly interface with comprehensive quiz management capabilities, making it perfect for educational institutions, training programs, or personal learning.
- Modern GUI Design: Clean, intuitive interface built with Java Swing
- Responsive Layout: Adaptive design that works across different screen sizes
- Theme Support: Light and dark mode options
- Smooth Animations: Fluid transitions between quiz states
- Multiple Question Types: Support for multiple choice, true/false, and text-based questions
- Dynamic Question Loading: Questions loaded from external configuration files
- Category-based Organization: Organize quizzes by subject or difficulty level
- Progress Tracking: Real-time progress indicators during quizzes
- Instant Feedback: Immediate scoring after each question
- Detailed Results: Comprehensive score breakdown with correct/incorrect answers
- Performance History: Track improvement over time
- Statistical Analysis: View performance metrics and trends
- Persistent Storage: Save quiz data and user progress
- Import/Export: Support for CSV and JSON question formats
- Backup & Restore: Automatic data backup functionality
- Multi-user Support: Individual user profiles and progress tracking
| Requirement | Version | Notes |
|---|---|---|
| Java JDK | 17+ | Oracle JDK or OpenJDK |
| IDE | Any | IntelliJ IDEA, Eclipse, VS Code |
| OS | Any | Windows, macOS, Linux |
-
Clone the Repository
git clone https://github.com/Cyril-36/Quiz-Application.git cd Quiz-Application -
Compile the Application
javac -cp src src/com/inquiz/main/QuizApplication.java
-
Run the Application
java -cp src com.inquiz.main.QuizApplication
# Create JAR file
jar -cvf InQuiz.jar -C src .
# Run JAR
java -jar InQuiz.jar- Launch Application: Run the main class to open the quiz interface
- Select Quiz Category: Choose from available quiz categories
- Start Quiz: Click "Start Quiz" to begin
- Answer Questions: Select answers using radio buttons or text input
- Review Results: View your score and detailed feedback
{
"questions": [
{
"id": 1,
"question": "What is the capital of France?",
"type": "multiple_choice",
"options": ["London", "Berlin", "Paris", "Madrid"],
"correct_answer": 2,
"explanation": "Paris is the capital and largest city of France.",
"difficulty": "easy",
"category": "Geography"
}
]
}question,option1,option2,option3,option4,correct_answer,explanation,category
"What is 2+2?","3","4","5","6",2,"Basic arithmetic","Mathematics"src/
├── com/inquiz/
│ ├── main/
│ │ └── QuizApplication.java # Main application entry point
│ ├── ui/
│ │ ├── MainFrame.java # Primary application window
│ │ ├── QuizPanel.java # Quiz display panel
│ │ ├── ResultsPanel.java # Results and scoring panel
│ │ └── SettingsDialog.java # Configuration dialog
│ ├── model/
│ │ ├── Question.java # Question data model
│ │ ├── Quiz.java # Quiz container model
│ │ ├── User.java # User profile model
│ │ └── QuizSession.java # Session management
│ ├── controller/
│ │ ├── QuizController.java # Main application logic
│ │ ├── DataController.java # Data persistence layer
│ │ └── UIController.java # UI event handling
│ ├── service/
│ │ ├── QuestionLoader.java # Question loading service
│ │ ├── ScoreCalculator.java # Scoring algorithms
│ │ └── DataManager.java # File I/O operations
│ └── utils/
│ ├── Constants.java # Application constants
│ ├── UIUtils.java # UI utility methods
│ └── ValidationUtils.java # Input validation
├── resources/
│ ├── questions/ # Question data files
│ ├── images/ # UI images and icons
│ └── config/ # Configuration files
└── test/
└── com/inquiz/ # Unit tests
| Pattern | Usage | Benefits |
|---|---|---|
| MVC (Model-View-Controller) | Overall architecture | Clear separation of concerns |
| Observer | UI event handling | Loose coupling between components |
| Factory | Question creation | Extensible question types |
| Singleton | Configuration management | Global state management |
| Strategy | Scoring algorithms | Flexible scoring methods |
public class Question {
private String questionText;
private List<String> options;
private int correctAnswer;
private String explanation;
private QuestionType type;
private String category;
private DifficultyLevel difficulty;
// Methods for validation, scoring, etc.
}public class QuizController {
private Quiz currentQuiz;
private QuizSession session;
private ScoreCalculator calculator;
public void startQuiz(String category) {
// Initialize quiz session
// Load questions
// Setup UI
}
public void submitAnswer(int questionId, Object answer) {
// Validate answer
// Update score
// Progress to next question
}
}public class DataManager {
public List<Question> loadQuestions(String filepath) {
// Support multiple formats (JSON, CSV, XML)
}
public void saveUserProgress(User user, QuizSession session) {
// Persist user data and progress
}
}- Custom Look & Feel: Implements custom Swing components
- Multi-threading: Background loading of questions and data
- Exception Handling: Comprehensive error management
- Logging: Integrated logging system for debugging
- Internationalization: Support for multiple languages
public class QuizApplication {
public static void main(String[] args) // Application entry point
public void initialize() // Initialize application
public void shutdown() // Cleanup resources
}public class QuizController {
public void loadQuiz(String category) // Load quiz by category
public boolean submitAnswer(Object answer) // Submit user answer
public QuizResults getResults() // Get quiz results
public void resetQuiz() // Reset current quiz
}public class Question {
public String getQuestionText() // Get question text
public List<String> getOptions() // Get answer options
public boolean isCorrect(Object answer) // Check if answer is correct
public String getExplanation() // Get answer explanation
}# Run all tests
java -cp "src:test:junit-5.jar" org.junit.runner.JUnitCore com.inquiz.test.AllTests
# Run specific test class
java -cp "src:test:junit-5.jar" org.junit.runner.JUnitCore com.inquiz.test.QuizControllerTest- Model Classes: 95% coverage
- Controller Logic: 88% coverage
- UI Components: 70% coverage
- Utility Methods: 100% coverage
- Web Interface: React/Angular frontend
- Database Integration: PostgreSQL/MySQL support
- Real-time Multiplayer: Competitive quiz modes
- Advanced Analytics: ML-based performance insights
- Mobile App: Android/iOS companion apps
- Cloud Sync: Cross-device synchronization
- Question Editor: Visual question creation tool
- Adaptive Learning: AI-powered difficulty adjustment
- Performance Optimization: Faster question loading
- Memory Management: Reduced resource usage
- Security: Enhanced data protection
- Accessibility: Screen reader support
- Localization: Additional language support
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
# Fork and clone
git clone https://github.com/YOUR_USERNAME/Quiz-Application.git
cd Quiz-Application
# Create development branch
git checkout -b develop
# Make changes and test
# ...
# Submit PR
git push origin developThis project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Cyril-36
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMplied, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Cyril-36 - Initial work - GitHub Profile
- Java Swing documentation and community
- Open source contributors and libraries
- Educational institutions using this application
- Beta testers and feedback providers
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: cyrilchaitanya@gmail.com