1.3-Object-Georienteerd-Programmeren

Quiz questions

Write a program that asks the user quiz questions. You can keep the interface simple, because it is (of course) all about the data model in this assignment. You will implement several types of quiz questions, each of which must be called in the same way.

The task is to create the (abstract) class Question and its subclasses. The following types of questions are possible in the program:

A few tips to get you started:

Example

****** Question 1 ******
This is a question you need to perform a calculation. Please enter the right answer of:

What is the value of 2+2?

Your answer: 4
That answer is correct!

****** Question 2 ******
This is a simple true or false question. Do you agree with the following statement?

Abstract classes can be instantiated into objects

Please select your answer:
1) True
2) False

Your answer: 2
That answer is correct!

****** Question 3 ******
This is a question where you must select 1 option from a list of choices. Please answer the following question: 

What programming language do we use in this course?

Please select your answer: 
1: C++
2: Java
3: PHP
4: Fortran


Your answer: 2
That answer is correct!

****** Question 4 ******
This is a question where you must select 1 option from a list of choices. Please answer the following question: 

What is your favorite course (this quartile)?

Please select your answer: 
1: Object Oriented Programming
2: Something else
3: Some weird course
4: I can't think of any more options :-)


Your answer: 4
That answer is INCORRECT!

Your final score was 4 out of 8 questions.