Create a programme in Scala that generates three random questions (including correct and wrong answers) of the form
x + y = ?; A, B, C, D
Where: x and y are all integers and A, B, C, D are the available answers.
For example: 3 + 4 = ?; 5, 7, 3, 8
The three questions generated should have the following characteristics:
Question 1: The correct answer should be 10 or less. Question 2: The correct answer should be less than 20 and more than 10. Question 3: The correct answer should be less than 100 and more than 20.
Think carefully about
- generating wrong answers that are likely to be chosen by primary school children.
- the design of your software, so that it can be easily extended.
We expect this challenge to take around four hours once you have familiarised yourself with Scala. There is no time limit.