Question: please help me complete my codes this should have control structures, arrays, and functions in my Java program. i need to make a simple 5-question

please help me complete my codes this should have control structures, arrays, and functions in my Java program. i need to make a simple 5-question quiz with three (3) choices that will display the score of the user.

String QnA[][] ={ {"1.)who is gon's bestfriend?" +" kurapika" + " leorio" + " Killua"}, };

System.out.println(""); System.out.println (" Are you ready to test your knowledge about HxH?");

displayQuestion1(QnA); System.out.println(""); System.out.print("your answer: "); ans1 = sc.next().charAt(0); System.out.println("");

displayQuestion2(QnA); System.out.println(""); System.out.print("your answer: "); ans2 = sc.next().charAt(0); System.out.println("");

displayQuestion3(QnA); System.out.println(""); System.out.print("your answer: "); ans3 = sc.next().charAt(0); System.out.println("");

displayQuestion4(QnA); System.out.println(""); System.out.print("your answer: "); ans4 = sc.next().charAt(0); System.out.println("");

displayQuestion5(QnA); System.out.println(""); System.out.print("your answer: "); ans5 = sc.next().charAt(0); System.out.println("");

totalScore = theTotalScore(ans1, ans2, ans3, ans4, ans5); finaleMessage(totalScore,QnA);

} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!