Online Quiz Application Using Java Programming Basic Description for the Online Quiz Application:- The Online Quiz Application is a simple Java program that conducts a general knowledge quiz. The program is designed to ask the user six questions, record their answers, and calculate their final score based on the correct responses. Below is a detailed description of the classes used in the project. -->Classes Used: Question Class:- ->Purpose: To represent a single quiz question. -->Attributes: ->questionText: A string containing the text of the question. ->options: An array of strings containing the answer options. ->correctOption: An integer representing the index of the correct answer option. -->Methods: ->Constructor: Initializes the question text, options, and the correct option. ->Getter Methods: getQuestionText(), getOptions(), getCorrectOption() to retrieve the respective attributes. -->Quiz Class: ->Purpose: To manage the quiz, including storing questions, starting the quiz, and calculating the score. -->Attributes: ->quizTitle: A string representing the title of the quiz. ->questions: A list of Question objects representing the questions in the quiz. ->score: An integer to keep track of the user's score. -->Methods: ->Constructor: Initializes the quiz title and sets up the questions list and score.
addQuestion(Question question): Adds a Question object to the quiz. start(): Conducts the quiz by iterating over the questions, presenting them to the user, and checking their answers. getScore(): Returns the user's final score. -->Note==As I Have Coded in Eclipse IDE as we can Run in Any compiler --> Reference Outputs==
![]()
![]()
![]()



