Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write java code Text File Game Write a program that will ask the user for their

ID: 3730676 • Letter: W

Question

Write java code

Text File Game Write a program that will ask the user for their name and then ask them to answer at least 5 multiple choice questions. The questions should all live in a file called questions.txt the file should look similar to the one below:

Q1) How tall is the CN Tower?

1)1000m 2)553m 3)1m 4)100m

Q2) What Is the Airspeed Velocity of an Unladen Swallow?

1) ...

Which will contain both the questions, the choices and the right answer. Your program will keep asking the user questions so long as there is more in the file and keep track of if the user got it right or wrong in a score variable. When the input file is out of questions and has gotten the last answer from the user it should tell the user their score and APPEND their score in a scores.txt file. The scores.txt file will record the users name and score. After the game is over it should show the users score along with other users who have played the game scores. You are expected to submit both your .java file and a file called questions.txt containing your questions (note: this is a good thing because it means you can structure them any way you want)

Explanation / Answer

Driver.java

questions.txt

scores.txt

Just run the main() of Driver class

If any problem in understanding, please ping. Always happy to help.

Thumbs up, please?

Thanks

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote