2.2.2 Package Game

2.2.2.3.2. Class Diagram for Game

CreateNewPlayer :
This class initially assigns a score of zero to the player that enters their name to log in and play multi choice, this class is a GUI and posts its details to the servlet multi2.

GetQuestion :
This class is responsible for getting the question from the database, it takes an integer and in return gives the GUI one question and three possible answers, it imports from the Search package to open a connection.

Multi2 :
This is the class that produces the multi - choice game itself, here it validates the players name and it too acts as a GUI to the Player, this servlet is purely used for presentation and it handles all POST requests from three different classes, eg. CreateNewPlayer, Answered and TopTen.

InsertPlayer :
It’s job is to insert the players name into the database and it uses the Search package to open a connection.

Roulette :
This class’s job is to insure that the player does not get asked the same job again in the game, when a question is picked its then written off a "Picked" in the database, what Roulette does is to search for all questions that are "Unpicked" and return the question numbers .ie an array amount . It too uses the Search package to open a connection.

HttpServlet:
This is the parent class for all servlets.