Programming Problem: On-line Quiz Game (50 marks) The main aim of the coursework is to develop an On-line Quiz Game.
Essential Requirements
Design and develop a simple client-server application implementing a Quiz game. The game can run in practice mode, in friendly mode or in tournament mode.
- The users can connect to register to the Quiz Server to start a quiz game.
- The server can set up a game to accept M players, to be decided at start-time.
- The client must have at least a textual interface. The communication between client and server can be implemented with any middleware technology of your choice (sockets, http, web services, etc..).
- In tournament mode, when the game starts the server send to all the clients a random question among N quizzes with the 5 possible answers that will be visualized to the users (only one is correct). a. The first user sending the correct answer will get 1 point. b. The winning user and the correct answer will be communicated to all the users, along with the current rank. c. After 10 questions the game ends and the final rank is visualized: a congratulation message is sent to the winner and a consolation message is sent to the others.
- In the friendly mode, when the game starts the server sends the same set of N questions, one after the other, to all users but the competition is not in realtime: each session with a user/client is managed independently from the others and when all the users have answered all the questions then the final 4 ranking is shown to all: use a timeout to conclude the quiz and print the final results
- In practice mode the user will receive N questions one after another and there is no timeout and no competition with other users: the final result will be sent to the user after answering the last question.
- Extend the client interface with a GUI interface aimed to make it more convenient for the user to use the client. Although you are free to decide the design the GUI, at least you should convert the main client interface into a GUI with places that display all the quizzes and messages from the server, a text area for you to write answers and an area where the list of currently logged users and, possibly, scores are displayed.
Desirable Requirements
- Extend requirement 2 so that the game will start when a timeout will elapse, instead of waiting for M players: this should be configured at start-time via configuration file or command line.
- The questions and answers must be stored in a file or a database and they must be randomly chosen. Feel free to design the file or database structure as you see fit.
10.Enhance functionality of the server so that users are able to register an account. There server will be expected to persist username and password on a database of your choice so that registered users are able to login and use their registered accounts on the system.
- Manage the case when one client disconnects during the game: how will you manage client reconnection?
12.Consider the tournament mode: how to guarantee fair treatment to all users considering that network delays can penalize some users with respect to others? For example, user A always receives the questions 1 second before the other: how the server could take into account these delays in order to determine which user took actually less time to answer?
13.Develop extra features like music, pictures or animations: be creative! 14.The use of appropriate software development and collaborative tools. Some examples are: Eclipse (IDE), Bitbucket (Version Control) and Trello (project management). 15.Use of software testing using JUnit Testing. 16.Develop a GUI for users using a web client or a mobile application.
1. The users can connect to register to the Quiz Server to start a quiz game.
2. The server can set up a game to accept M players, to be decided at start-time.
3. The client must have at least a textual interface. The communication between
client and server can be implemented with any middleware technology of your
choice (sockets, http, web services, etc..).
4. In tournament mode, when the game starts the server send to all the clients
a random question among N quizzes with the 5 possible answers that will be
visualized to the users (only one is correct).
a. The first user sending the correct answer will get 1 point.
b. The winning user and the correct answer will be communicated to all
the users, along with the current rank.
c. After 10 questions the game ends and the final rank is visualized: a
congratulation message is sent to the winner and a consolation
message is sent to the others.
5. In the friendly mode, when the game starts the server sends the same set of
N questions, one after the other, to all users but the competition is not in realtime:
each session with a user/client is managed independently from the
others and when all the users have answered all the questions then the final
4
ranking is shown to all: use a timeout to conclude the quiz and print the final
results
6. In practice mode the user will receive N questions one after another and
there is no timeout and no competition with other users: the final result will be
sent to the user after answering the last question.
7. Extend the client interface with a GUI interface aimed to make it more
convenient for the user to use the client. Although you are free to decide the
design the GUI, at least you should convert the main client interface into a
GUI with places that display all the quizzes and messages from the server, a
text area for you to write answers and an area where the list of currently
logged users and, possibly, scores are displayed.