In java, I need to read in a txt file that has 25 words along with their definit
ID: 3717204 • Letter: I
Question
In java, I need to read in a txt file that has 25 words along with their definitions then I have to make multiple choice questions with them. Txt file Umbrella: used in the rain Computer: used for research and many other things Calculator: used for calculations in math Chair: used to sit Smoothie: drink made with fruits and juice With this txt file, I need to make a multiple choice/flashcard game with 5 questions. The program will ask for the definition of a random word chosen from the txt file and the answer choices will contain the right answer along with 3 different other definitions from the txt file then it allows the user to choose the right answer then it displays the right answer then it moves on to the next question When the game restarts, it will ask a different set of 5 questions chosen randomly. For example: What is the definition of Umbrella: a) used in the rain b) drink made with fruits and juice c) used for research and many other things d) used to sit User answer: Answer: a What is the definition of."....Explanation / Answer
================ Class : QuestionAnswer ==================
================ Class : FlashCardGame ==================
================ Output ==================
==================== Flash Card Game ====================
============ You have to answer 5 questions =============
==== At the end I will ask you to play again =====
=========================================================
Q. What is the definition of pumice stone
1. Used for research and many other things
2. Keep an eyeglass screw in place
3. meant for your feet
4. Coke is adept
2
Wrong answer. Right answer is : meant for your feet
Q. What is the definition of Computer
1. Coke is adept
2. Clean a keyboard
3. Used for research and many other things
4. final rinse cycle while doing laundry
2
Wrong answer. Right answer is : Used for research and many other things
Q. What is the definition of Stale bread
1. Remove tea stains
2. To clean dirt off suede
3. Coke is adept
4. Coke is adept
2
Correct Answer
Q. What is the definition of Hairdryer
1. Used to dry hair
2. releases excess water
3. meant for your feet
4. Drink made from fruit and juice
2
Wrong answer. Right answer is : Used to dry hair
Q. What is the definition of Vodka
1. final rinse cycle while doing laundry
2. Used to dry hair
3. cloth or paper towel
4. extends the life of your flowers
2
Wrong answer. Right answer is : extends the life of your flowers
Total questions asked : 5
Correct answers : 1
Incorrect answers : 4
Play Again (y/n) :
y
==================== Flash Card Game ====================
============ You have to answer 5 questions =============
==== At the end I will ask you to play again =====
=========================================================
Q. What is the definition of Toothpicks
1. Used for rain
2. Remove tea stains
3. Used to Label meat
4. Keep an eyeglass screw in place
2
Wrong answer. Right answer is : Used to Label meat
Q. What is the definition of Hairspray
1. Spritz your tights and stocking with sticky
2. Secure slinky garments
3. To clean dirt off suede
4. Used to Label meat
1
Correct Answer
Q. What is the definition of Vodka
1. Used for rain
2. extends the life of your flowers
3. final rinse cycle while doing laundry
4. Used for research and many other things
1
Wrong answer. Right answer is : extends the life of your flowers
Q. What is the definition of Clear Nail Polish
1. final rinse cycle while doing laundry
2. Keep an eyeglass screw in place
3. squeaky shoes, remove the insole
4. squeaky shoes, remove the insole
1
Wrong answer. Right answer is : Keep an eyeglass screw in place
Q. What is the definition of Vaseline
1. Used to Label meat
2. final rinse cycle while doing laundry
3. squeaky shoes, remove the insole
4. Used to sit on it
1
Wrong answer. Right answer is : squeaky shoes, remove the insole
Total questions asked : 5
Correct answers : 2
Incorrect answers : 8
Play Again (y/n) :
N
================ QA.txt ==================
Umbrella:Used for rain
Computer:Used for research and many other things
Calculator:Used for math calculations
Chair:Used to sit on it
Smoothie:Drink made from fruit and juice
Rubber bands:Used to Wrap a gift
pumice stone:meant for your feet
salad spinner:releases excess water
Coca Cola:Coke is adept
Hairdryer:Used to dry hair
Toothpicks:Used to Label meat
Salt:Remove tea stains
Post-It Note:Clean a keyboard
Felt Circles: Secure slinky garments
Clear Nail Polish:Keep an eyeglass screw in place
Windex:cloth or paper towel
Wax paper:If you get wax on a piece
Hairspray:Spritz your tights and stocking with sticky
Stale bread:To clean dirt off suede
Vodka:extends the life of your flowers
Double-stick tape:pinch to hem
Distilled white vinegar:final rinse cycle while doing laundry
Vaseline:squeaky shoes, remove the insole
Dryer Sheets:static from your hair or your clothes
Ice trays:earrings and rings
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.