Question

I have encountered these problems doing the unit 6 game zone involving quiz.java, what do i...

I have encountered these problems doing the unit 6 game zone involving quiz.java, what do i need to change?

----jGRASP exec: javac -g Quiz.java
Quiz.java:101: error: -> expected
System.out.println(questions[i].getQuestion(());
^
Quiz.java:101: error: ')' expected
System.out.println(questions[i].getQuestion(());
^
Quiz.java:101: error: ')' expected
System.out.println(questions[i].getQuestion(());
^
Quiz.java:103: error: -> expected
System.out.println(questions[i].getChoices(());
^
Quiz.java:103: error: ')' expected
System.out.println(questions[i].getChoices(());
^
Quiz.java:103: error: ')' expected
System.out.println(questions[i].getChoices(());
^
Quiz.java:109: error: illegal start of expression
if(questions[i].getAnswer().equals(userinput)));
^
Quiz.java:129: error: ';' expected
System.out.println("No. The correct answer is" +questions[i].getAnswer()));
^
Quiz.java:121: error: 'else' without 'if'
else
^
Quiz.java:141: error: ')' expected
System.out.println("% of Correct answers:"+((double)correctAnswers/COUNT*100.0);
^
10 errors

Homework Answers

Answer #1

Please replace line 101 with below
System.out.println(questions[i].getQuestion());
Please replace line 103 with below
System.out.println(questions[i].getChoices());
Please replace line 109 with below
if(questions[i].getAnswer().equals(userinput))
Please replace line 129 with below
System.out.println("No. The correct answer is" +questions[i].getAnswer());
Please replace line 141 with below

System.out.println("% of Correct answers:"+((double)correctAnswers/COUNT*100.0));

NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.
I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions