Question: For this assigment, I need to create a java program on the command line. As part of the arguments, the user will input the location
For this assigment, I need to create a java program on the command line. As part of the arguments, the user will input the location of a file containing words and their definitions, separated by semi-colons. The program will be executed by using the javac command.
The words.txt file will have the following structure:
Java: A Programming Language
Recursive Functions: A recursive function (DEF) is a function which either calls itself or is in a potential cycle of function calls. As the definition specifies, there are two types of recursive functions.
Private: A private member is only accessible within the same class as it is declareda
Public: A public member is accessible to all classes (unless it resides in a module that does not export the package it is declared in).
The user will start your program and will be prompted to start a new game. A game consists of 5 questions asked. Your program must randomize the order in which the words will show up. Along with a question, the program will display another 4 randomly chosen answer choices, displayed like this:
What is the definition of Java:
a)A recursive function (DEF) is a function which either calls itself or is in a potential cycle of function calls. As the definition specifies, there are two types of recursive functions.
b)A Programming Language
c)A public member is accessible to all classes (unless it resides in a module that does not export the package it is declared in).
d)A private member is only accessible within the same class as it is declared
Answer: b
Your program must keep track of the correct and incorrect responses, and give feedback to the user after selecting a choice. If an incorrect answer was selected, you must show the correct response. After 5 questions have been asked, you will display their score along with the correct answers for each question.
Any help / ideas of how to complete this would be appreciated! Thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
