This is a console-based quiz application built in C++. It allows users to answer multiple-choice questions while tracking their score and total time taken. Skipped or incorrectly answered questions display explanations to enhance learning.
The application demonstrates core Object-Oriented Programming concepts and memory management in C++.
- Constructors: Initialize quiz questions and the quiz manager object.
- Destructors: Clean up dynamically allocated memory for questions and the quiz manager.
- Polymorphism: Implemented through the
Questionbase class andTimedQuestionderived class, allowing different types of questions to be handled uniformly. - Dynamic Memory Allocation: Questions and the quiz manager are allocated dynamically using
newand cleaned up withdelete. - Timer and Score Tracking: Measures the total time taken to complete the quiz and calculates the score with feedback.
-
Multiple-Choice Questions
- 12 pre-defined questions on C++ OOP concepts.
- Users can answer or skip questions.
- Explanations are provided for skipped or incorrect answers.
-
Score Tracking
- Displays total score, percentage, and performance feedback.
-
Time Measurement
- Tracks total duration of the quiz.
-
Interactive Console Interface
- Questions and options are clearly displayed.
- Immediate feedback is provided for each answer.
- Programming Language: C++
- C++ Standard Library Features
iostreamfor input/output operations.vectorandstringfor data storage.chronofor time measurement.- Dynamic memory allocation with
newanddelete.