Question
a
and b
correct
that has a int
parameter returns true if the parameter is the correct sum a+bcorrect
that has a String
parameter returns true if the parameter is the correct sum a+b. Use Integer.parseInt()
to convert the String
to an int
toString
that returns the question “What is a + b?”Scanner
, and Question
. Use import java.util.Scanner;
before the class declarationwhile
loop that keeps asking the question until the question is answered correctly.for
loop so you ask 3 different questions. Here is how it might look: