JPR (46,54,56,63)
JPR (46,54,56,63)
PROJECT REPORT ON
“MCQ QUIZ GENERATOR”
Subject-Java Programming(314317)
SUBMITTED BY
1.Devgire Kasturi [46]
2.Gaikwad Tushar [54]
3.Gawali Radhika [56]
4.Hiwale Chetan [61]
Under the Guidance of
Dr. R. S. Patil
CERTIFICATE
This is to certify that the Project Report entitled
“MCQ QUIZ GENERATOR”
SUBMITTED BY
1.Devgire Kasturi [46]
2.Gaikwad Tushar [54]
3.Gawali Radhika [56]
4.Hiwale Chetan [61]
Under our supervision and guidance for partial fulfilment of the requirement for
Diploma in Computer Technology affiliated to
Maharashtra State Board of Technical Education,Mumbai for academic year
2024-2025
We also extend our sincere gratitude to Dr. G. N. Jorvekar, the esteemed Head
of the Computer Department. His unwavering support and the provision of his
expert guidance played a crucial role in navigating the technical aspects of this
project. His belief in our abilities and his motivation spurred us to overcome
challenges and strive for the best possible outcome.
Rationalize:
The Java Swing-based quiz app is well-structured and functional. It dynamically
loads questions, processes answers, and displays the final score.
Aim:
Benefits:
3. Use of arrays and loops – Helps understand how to manage and iterate over
structured data.
4. Logical flow control – Covers decision-making using if, for, and switch-like
logic.
Literature Review:
The development of educational software has seen significant growth with the
advancement of programming languages and user interface tools. Among these,
Java remains a popular choice for building interactive desktop applications due
to its platform independence and rich set of GUI libraries such as Java Swing.
CONCLUSION
This project not only reinforces theoretical learning but also improves practical
skills in building standalone applications. The modular structure makes it easy
to extend with more questions or additional features like timed quizzes, score
saving, or difficulty levels. Overall, the Quiz App is an effective educational
tool and a strong foundation for more advanced application develop.
REFERENCE
// Constructor for the QuizApp class. This is called when a new QuizApp
object is created.
public QuizApp() {
// Set the title of the quiz window.
setTitle("Java Quiz");
// Set the initial size of the quiz window (width x height in pixels).
setSize(1000, 800);
// Set the layout manager for the window to a GridLayout with 6 rows
and 1 column.
// This will arrange the components in a grid-like fashion.
setLayout(new GridLayout(6, 1));
// Set the default close operation for the window. When the user clicks
the close button, the application will exit.
setDefaultCloseOperation(EXIT_ON_CLOSE);
// Method to load the current question and its options into the GUI.
public void loadQuestion() {
// Check if there are more questions to display.
if (currentQuestion < questions.length) {
// Set the text of the questionLabel to display the current question
number and the question text.
questionLabel.setText("Q" + (currentQuestion + 1) + ": " +
questions[currentQuestion][0]);
// Loop through the options array to set the text for each radio button.
for (int i = 0; i < 4; i++) {
// Set the text of the current radio button to the corresponding
option from the questions array.
options[i].setText(questions[currentQuestion][i + 1]);
// Deselect all radio buttons before loading a new question.
options[i].setSelected(false);
}
} else {
// If all questions have been answered, show the final result.
showResult();
}
}
// This method is called when an action event occurs (in this case, when
the submit button is clicked).
public void actionPerformed(ActionEvent e) {
// Variable to store the text of the selected radio button.
String selected = null;
// Loop through the options array to find which radio button is selected.
for (JRadioButton option : options) {
// If the current radio button is selected, store its text in the 'selected'
variable and break out of the loop.
if (option.isSelected()) {
selected = option.getText();
break;
}
}