0

I am new to Java and need help.

https://code.sololearn.com/cODV4xxOGADf/?ref=app Solve for y, m and b. Add 2 choices that behave similarly to your part 1 program, but have the user solve for m and b instead. These choices should also randomly generate problems, and print if the user answers correctly. Your main program should display a menu asking which type of question to ask: Select 1 to Solve for Y, 2 to Solve for M, 3 to Solve for B and 4 to quit. When the user selects the question type, one question should be asked, then the user should return to the menu. This should repeat until the user selects quit, then the program should exit. Use one or more methods and loops to produce this behavior.

16th Jun 2020, 11:47 PM
Peyson
 Peyson  - avatar
7 Answers
+ 2
What is this 'ans' suppose to do? How come you are comparing that with 'y'?
16th Jun 2020, 11:59 PM
Avinesh
Avinesh - avatar
+ 2
I still do not understand why is that ans passed to the method? Are you like predicting the answer and checking whether it's true or not?
17th Jun 2020, 12:04 AM
Avinesh
Avinesh - avatar
+ 2
The code play ground in sololearn is not interactive to run this code and also it does not allow creating more than 1 scanner object. I do not have access to a laptop right now to run that code and test it. It would be better if you tell me where exactly the problem occurs, what does the error say and something like that. Or else you could wait for someone else to answer.
17th Jun 2020, 12:32 AM
Avinesh
Avinesh - avatar
+ 1
U are welcome
17th Jun 2020, 8:52 AM
Md Sahid Sk
Md Sahid Sk - avatar
0
i can upload it rigjt now, its a separate code. my apologies
17th Jun 2020, 12:00 AM
Peyson
 Peyson  - avatar
17th Jun 2020, 12:01 AM
Peyson
 Peyson  - avatar
0
Yes, exactly
17th Jun 2020, 12:05 AM
Peyson
 Peyson  - avatar