Question
Hi, I have this assignment due soon: Write a Java documented program to perform the role of a quiz maker. The program should work as
Hi, I have this assignment due soon:
Write a Java documented program to perform the role of a quiz maker. The program should work as follows:
1. Prompt the student to enter their user name and password. Read a file that contains a list of all students information to validate the login credentials. Start the quiz only when the credentials are correct. After 3 failed attempts, exit the program.
2. Randomly pick ten questions from the TestBank.txt file.
3. Display one question at a time. Get the answer then move to the next question (the answers are in a file called Answers.txt).
4. Do not accept answers other than true or false (T or F should be fine too). The answers should not be case sensitive.
5. When the user is done with the quiz, print out a report (On screen and on a file) with the below information in it:
First name
Last name
Score
Elapsed time
Users answers and the correct answer.
6. Name the file from step 5 as follows: (userName_COSC_236_Quiz_Date_Time), where:
userName is the actual user name of the student who took the quiz.
Date_Time is the date and time of the start of the test.
7. Prompt for another user name and password or done as a user name to exit.
=====================================================================
There is a file with the student's names called userDetails.txt are are formatted as like this:
Username | Password | First Name | Last Name | |
kingkrule1 | fjsdklfjs | King | Krule | kk1@sfsdf.com |
katy1 | sdfksdf | Katy | Perry | kp@dsfsdf.com |
postmal | sdkfsfd | Post | Malone | skdfj@sdfsd.com |
The TestBank.txt file contains questions seperated by a line break like this:
question1
question2
question3
The Answers.txt file contains the TRUE/FALSE answers designated to the certain questions sequentially:
TRUE
TRUE
FALSE
====================================================
Something that might also help is that recently we've been learning about Arrays during lecture; maybe it's easier for me to understand if this is coded with arrays?
There are other answers to this assignment in Chegg but they dont include the userDetails.txt and its format.
Thank you!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started