Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using TCP API in Java, The environment allows students ( clients ) to take math quizzes related to the four main operations + , -
Using TCP API in Java, The environment allows students clients to take math quizzes related to the four main
operations Each quiz consists of a number of questions that are based on these four
operations, with a certain difficulty level that is determined by the number of operations in
the question and the number of digits that numbers consist of The student must be able to
provide the correct answer for each question to earn the question point. The quiz total grade
is the summation of all earned questions points.
On the server side:
The server application must accept clients connections and respond to them. The server
must be able to handle more than one connection at the same time but for each connection
it must not allow more than one quiz to be performed at the same time.
When the client application is connected, the client must be asked continuously to choose
either to:
Start a new quiz.
Terminate.
If the student requests to start a quiz, the program must start configuring settings of the
quiz by asking the student to specify the following: The number of questions. Whether a timeout must be specified for questions, within which the student must
provide the answer to be counted. If the student chooses to specify a timeout, he must
be asked to enter this timeout in seconds The difficulty of questions which is specified by:
o Maximum number of operations that questions consist of
Example: if the student chooses it to be all questions must consist
of exactly one operation such as:
Example: if the student chooses it to be the questions could be any
of the following:
The maximum supported value for this option is
o Maximum number of digits that form numbers in the question.
Example: if the student chooses it to be then all numbers in the
question must consist of exactly one digit.
Example: if the student chooses it to be then numbers could consist
of or digits.
When the quiz starts, for each question, the server must select numbers and operations in
the question randomly as specified in the quiz settings. The student must provide the correct
answer within the specified timeout if a timeout is specified If so the point of the question
will be added to the total grade. For each question the student can send only one answer.
This process is repeated for all the questions. Make sure to introduce a slight delay between
each question and the next. The server application must compute the points by summing the
points of the questions. The server must send the student the quiz result which includes a
report of all questions showing which questions were answered correctly and which were
answered incorrectly along with the correct answer, then the quiz total grade.
If the client selects to terminate, the connection with the server must be terminated.
Note that the server must preserve statistics info that includes:
Total number of quizzes performed by all students.
The numbers of quizzes performed that included one operation, two operations, three
operations, and four operations.
The numbers of quizzes for which students achieved:
of the total grade.
of the total grade.
of the total grade.
of the total grade.
of the total grade.
This statistics info must persist even if the server application is terminated.
If there is no activity received connections on the server side for minutes, the server
application must ask the admin whether to:
Continue waiting, in this case the server application must go back to waiting for
clients connections.
Display statistics and terminate, statistics info must be displayed to the admin and the
server application must be terminated.
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