Question: I want to write a Java program. My program would ask two questions: (1) 1+1=? (2) 2+1 =? Show one question at a time on
I want to write a Java program.
My program would ask two questions: (1) 1+1=? (2) 2+1 =? Show one question at a time on the console. The program allows users to input answers via a command-line (no GUI). Give users five seconds to answer each question. The next question would show ONLY when the user answers the question correctly OR when the time is up.
Once users answer the question correctly within the given time, the next question needs to show (it wouldn't wait to show until the time is up). Tell users whether the time is up, or they answer the question correctly/wrong. The timer should keep counting down (not restart) when the user answers the question wrong. The timer restarts only when the next question shows.
Thank you in advance.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
