Create a game for sync solution
Contents Table of figures: 2 1. Introduction: 3 2. Requirements specification and analysis: 3 2.1. Functional Requirements: 3 2.2. Actors: 3 2.3. Use Case Diagrams: 4 2.3.1. Use Case Diagram for Administrator: 4 2.3.2. Use Case Diagram for Player: 5 2.4. Use Case Specifications: 6 2.4.1. Administrator use cases: 6 2.4.2. Player use cases: 6 2.4.3. Use case specifications for Administrator: 7 2.4.4. Use Case Specifications for Player: 12 2.5. Database: 23 2.5.1. Entity relationship: 23 2.5.2. Tables and attributes detail: 24 2.6. Non-functional Requirements: 26 2.6.1. Sequence Diagram for Administrator: 26 2.6.2. Class Diagram: 35 2.6.3. Analysis Class Diagram: 36
Table of figures:
Figure 1: Use Case Diagram for Administrator 4
Figure 2: Use Case Diagram for Player 5
Figure 3: Entity relationship diagram 23
Figure 4: Administrator Sign In 26
Figure 5: Administrator Game Settings 27
Figure 6: Administrator Sign Out 28
Figure 8: Player View High Scores 30
Figure 9: Player Start Game 31
Figure 10: Player Display Your Best Score 32
Figure 11: Player Answer Bonus Question 33
1. Introduction:
‘JEOPARDY’ is the America’s favorite Quiz Show. The purpose of this project is to develop a computerized version of the show using the software engineering design principles studied. The computer game will be covering up all most every segment of the real-life game show.
2. Requirements specification and analysis:
2.1. Functional Requirements:
· There must be 13 categories of the questions
· There must be 3 rounds in the game
· Round 1 (“JEOPARDY!”) must have six categories
· Round 2 (“DOUBLE JEOPARDY!”) must have six categories
· Final round (“FINAL JEOPARDY!”) must have 1 category
· Each category must have 5 sets of questions
· Each question set must have increasing difficulty and points
· At the start of the game players must be able to enter the name to show their unique identity
· Questions must not repeat during the gameplay
· Each question must be timed
· Each round must be timed
· Scores must be saved
· High scores and the names of those who have achieved high score must be displayed at the beginning of the game
· Points must be subtracted for each wrong answer
· In the final round of the game, the players must be allowed to bet
· The game must include the random “DAILY DOUBLES”
· Round 1 must have one “DAILY DOUBLES”
· Round 2 must have two “DAILY DOUBLES”
· If question with the “DAILY DOUBLES” is answered correctly, the points double the amount of the question should be added to the players score
· Final round should have only one question
· Player should be able to raise the bet to the question, if the player has answered correctly, double the amount of the raised bet should be added to the players’ score
· The questions must be fetched from the database based on the players’ selection of round category and per the difficulty
2.2. Actors:
The real-life jeopardy game has two main actors, ‘the player, one who is selecting difficulty and answering the show’ and ‘the presenter, the one who is hosting the show’. Similarly, the computerized version of the TV game show will have the following actors:
· Player: As the name suggests, will be responsible of playing the game, selecting the questions and difficulty
· Administrator: Will be the one who can add and update the time for each question and can change the amount for question. Administrator will also be able to add new questions which can be randomly fetched from the database later.
2.3. Use Case Diagrams:
The use case diagram will help in understanding the interactions between the actors and the system. It will help in identify and arrange the system requirements.
2.3.1. Use Case Diagram for Administrator:
Figure 1: Use Case Diagram for Administrator
2.3.2. Use Case Diagram for Player:
Figure 2: Use Case Diagram for Player
2.4. Use Case Specifications:
2.4.1. Administrator use cases:
· Sign in
· Game settings
· Add questions
· Update questions
· Sign out
2.4.2. Player use cases:
· Sign in
· View high scores
· Start
· Play rounds
· Play round 1
· Play round 2
· Play final round
· Restart
· Display your best score
· Answer bonus question
· Sign out
2.4.3. Use case specifications for Administrator:
|
Use case: Sign in |
|
Id: UC-1 |
|
Brief description: The administrator can use credentials such as the password and username to sign in to the administrator interface |
|
Primary actors: Administrator |
|
Secondary actors: None |
|
Pre-condition(s): User is an admin; the jeopardy game is running on the system and the credentials user entered must match with the ones stored in database |
|
Main flow: 1. User selects the administrator login option from the main menu 2. A window displays the empty fields where the user can enter the username and password 3. User presses the sign in button
|
|
Post-condition(s): Administrator signed in successfully |
|
Alternative flows: Upon entering the wrong credentials the user will be asked to enter the credentials again |
|
Use case: Game settings |
|
Id: UC-2 |
|
Brief description: The administrator can add and update the questions from this interface |
|
Primary actors: Administrator |
|
Secondary actors: None |
|
Pre-condition(s): User is an admin; the jeopardy game is running on the system and the administrator is signed in |
|
Main flow: 1. User selects the administrator game settings option from the main menu after logging in 2. A menu with ‘add question’ and ‘update question’ option is displayed |
|
Post-condition(s): Game settings menu displayed successfully |
|
Alternative flows: None |
|
Use case: Add questions |
|
Id: UC-3 |
|
Brief description: The administrator can add questions from this interface |
|
Primary actors: Administrator |
|
Secondary actors: None |
|
Pre-condition(s): User is an admin; the jeopardy game is running on the system and the administrator is signed in |
|
Main flow: 1. User selects the add questions option from the game settings after signing in 2. A form is displayed where user enters the details and answers for the new question 3. User saves the question by pressing the save button |
|
Post-condition(s): Question added successfully |
|
Alternative flows: If any field of the form is left empty, the system will prompt the user to enter the details and then save the question |
|
Use case: Update questions |
|
Id: UC-4 |
|
Brief description: The administrator can update questions from this interface |
|
Primary actors: Administrator |
|
Secondary actors: None |
|
Pre-condition(s): User is an admin; the jeopardy game is running on the system and the administrator is signed in |
|
Main flow: 1. User selects the update questions option from the game settings after signing in 2. A list of already added questions are displayed to the user 3. User selects the question to edit from a list of questions 4. Already filled form for that question is displayed where user enters the new details and answers for the that particular question 5. User saves the question by pressing the save button |
|
Post-condition(s): Question updated successfully |
|
Alternative flows: If any field of the form is left empty, the system will prompt the user to enter the details and then save the question |
|
Use case: Sign out |
|
Id: UC-5 |
|
Brief description: The administrator can sign out |
|
Primary actors: Administrator |
|
Secondary actors: None |
|
Pre-condition(s): User is an admin; the jeopardy game is running on the system and administrator is signed in |
|
Main flow: 1. User selects the sign out option 2. User is redirected to the main page |
|
Post-condition(s): Administrator signed out successfully |
|
Alternative flows: None |
2.4.4. Use Case Specifications for Player:
|
Use case: Sign in |
|
Id: UC-1 |
|
Brief description: The player can use credentials such as the password and username to sign in to the player interface |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the credentials user entered must match with the ones stored in database |
|
Main flow: 1. User selects the player login option from the main menu 2. A window displays the empty fields where the user can enter the username and password 3. User presses the sign in button
|
|
Post-condition(s): Player signed in successfully |
|
Alternative flows: Upon entering the wrong credentials the user will be asked to enter the credentials again |
|
Use case: View high scores |
|
Id: UC-2 |
|
Brief description: The player can view high scores |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the view high scores option from the main menu 2. A new window opens and displays the high scores
|
|
Post-condition(s): High scores displayed successfully |
|
Alternative flows: None |
|
Use case: Start |
|
Id: UC-3 |
|
Brief description: The player start the game |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the start option from the game menu 2. The system displays further game option
|
|
Post-condition(s): Game started successfully |
|
Alternative flows: None |
|
Use case: Play rounds |
|
Id: UC-4 |
|
Brief description: The player start the game and play a round |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the play rounds option from the game start menu 2. The user gets the round selection options based on the game progress
|
|
Post-condition(s): Rounds started successfully |
|
Alternative flows: None |
|
Use case: Restart |
|
Id: UC-5 |
|
Brief description: The player can restart a round |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the restart round option 2. The user gets the pop window displaying ‘are you sure you want to exit?’ displayed with the ‘yes’ or ‘no’ option
|
|
Post-condition(s): Game restarted successfully |
|
Alternative flows: None |
|
Use case: Play round 1 |
|
Id: UC-6 |
|
Brief description: The player can play round 1 |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the play round 1 option 2. Round 1 starts
|
|
Post-condition(s): Round 1 started successfully |
|
Alternative flows: None |
|
Use case: Play round 2 |
|
Id: UC-7 |
|
Brief description: The player can play round 2 |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the play round 2 option 2. Round 2 starts
|
|
Post-condition(s): Round 2 started successfully |
|
Alternative flows: If user has not completed round 1 then a pop up notifies that the user must complete the round 1 first to play round 2 |
|
Use case: Play final round |
|
Id: UC-8 |
|
Brief description: The player can play final round |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the play final round option 2. Final round starts
|
|
Post-condition(s): Final round started successfully |
|
Alternative flows: If user has not completed round 1 and round 2 then a pop up notifies that the user must complete the round 1 and round 2 first to play final round |
|
Use case: Display your best score |
|
Id: UC-9 |
|
Brief description: The player can view his/her best score |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the display your best score option from the game menu 2. A new window opens and displays the users best score
|
|
Post-condition(s): User’s best score displayed successfully |
|
Alternative flows: If the user has no previous best score, he/she will be notified using a pop up window |
|
Use case: Answer bonus question |
|
Id: UC-10 |
|
Brief description: Player can play a special feature i.e. ‘answer bonus question’ to achieve bonus score |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and the user is signed in |
|
Main flow: 1. User selects the answer bonus question score option from the game menu 2. A new window opens and displays the bonus question 3. User selects best option to answer and presses the ‘answer’ button 4. The new pop up window opens and display the result of the answer and user gets the bonus points if correct
|
|
Post-condition(s): Bonus question answered (played by the ‘jeopardy computer game player) |
|
Alternative flows: None |
|
Use case: Sign out |
|
Id: UC-11 |
|
Brief description: The player can sign out |
|
Primary actors: Player |
|
Secondary actors: None |
|
Pre-condition(s): User is a player; the jeopardy game is running on the system and player is signed in |
|
Main flow: 1. User selects the sign out option 2. User is redirected to the main page |
|
Post-condition(s): Player signed out successfully |
|
Alternative flows: None |
2.5. Database:
2.5.1. Entity relationship:
Figure 3: Entity relationship diagram
2.5.2. Tables and attributes detail:
· Questions: The table with have the data related to the questions added by the database and further it will also have the information that which question has been appeared how many times, to manage the question repetition.
· Question ID: It is the primary key for the questions table, as each question will be different from each other, each question will be having a unique ID which will be of data type ‘integer’
· Category ID: The category ID is the foreign key from the table categories.
· Choice 1: Choice 1 is the first option which player can select as an answer, the data type will be ‘varchar’.
· Choice 2: Choice 2 is the second option which player can select as an answer, the data type will be ‘varchar’.
· Choice 3: Choice 3 is the third option which player can select as an answer, the data type will be ‘varchar’.
· Choice 4: Choice 4 is the fourth option which player can select as an answer, the data type will be ‘varchar’.
· Answer: It is the actual answer of the question; the data type will be ‘varchar’.
· Appearance Flag: For each question a flag count is being maintained so that repetition can be tracked.
· Difficulty ID: It is the foreign key referenced from the difficulties table.
· Difficulties: The table consists of the difficulty levels for a question and the scores associated with each difficulty
· Difficulty ID: It is the primary key for the difficulties table; data type is ‘integer’
· Difficulty Name: This column has names of each difficulty; type ‘varchar’
· Difficulty Score: This is the score for each difficulty; type ‘integer’
· Users: The table contains data of all the users of the ‘jeopardy game’
· User ID: It is the primary key for the uses id table; data type ‘integer’
· Player ID: It is the foreign key referenced from the player table; data type ‘integer’
· Username: It is the name of the user; data type ‘varchar’
· User Type: It is the type of the user; data type ‘varchar’
· Password: This column has the password for every user; data type ‘varchar’
· Categories: The categories which are used in the game are in this table
· Category ID: It is the primary key attribute for the category id table; data type ‘integer’
· Category: It is the name of a category; data type ‘varchar’
· Player: The player table has all the player information as stated follows
· Player ID: It is the primary key in the players table, every player of the game will have the unique player ID; data type ‘integer’
· User ID: The user ID is foreign key from the users table; data type ‘integer’
· Player name: This column has the name of the player; data type ‘varchar’
· Player e-mail: This column has the e-mail of the players; data type ‘varchar’
· Score: This is the score for an individual player; data type ‘integer’
· Scores: Contains the scores for the players
· Score ID: This will have the unique ID for each score of a player; data type ‘integer’
· Player ID: The player ID is the foreign key referenced from the Players table; data type ‘integer’
· Round: The contains the round number so that we can keep track of the score for each round of an individual player; data type ‘varchar’
· Score: This is the actual score; data type ‘integer’
2.6. Non-functional Requirements:
2.6.1. Sequence Diagram for Administrator:
· Administrator Sign In - SD1:
Figure 4: Administrator Sign In
· Administrator Game Settings – SD2:
Figure 5: Administrator Game Settings
· Administrator Sign Out– SD3:
Figure 6: Administrator Sign Out
· Player Sign In – SD4:
· Player View High Scores – SD5:
Figure 8: Player View High Scores
· Player Start Game – SD6:
· Player Display Your Best Score – SD7:
Figure 10: Player Display Your Best Score
· Player Answer Bonus Question – SD8:
Figure 11: Player Answer Bonus Question
· Player Sign Out – SD9:
2.6.2. Class Diagram:
2.6.3. Analysis Class Diagram:
|
Sr. no |
Member |
Description |
|
|
User |
|
|
1 |
-userId:int |
Responsible for storing user id |
|
2 |
-playerId:int |
Responsible for storing player id |
|
3 |
-userName:string |
Responsible for storing username |
|
4 |
-userType:string |
Handles user type |
|
5 |
-password:string |
Contains user password |
|
6 |
+getUserInfo():string |
Gets the user information including name, e-mail etc. |
|
7 |
+setUserInfo():void |
Saves the user information |
|
|
Player |
|
|
8 |
-playeId:int |
Responsible for storing player id |
|
9 |
-userId:int |
Responsible for storing user id |
|
10 |
-playerName:string |
Responsible for storing player name |
|
11 |
-playerEmail:string |
Responsible for storing player e-mail |
|
12 |
-score:int |
Contains player score |
|
13 |
+getPlayerInfo():string |
Gets player information |
|
|
Administrator |
|
|
14 |
-adminId:int |
Responsible for storing administrator id |
|
15 |
-userId:int |
Responsible for storing user id |
|
16 |
-adminName:string |
Responsible for storing the admin name |
|
17 |
-adminEmail:string |
Contains admin e-mail |
|
18 |
-adminPassword:string |
Has admin password |
|
19 |
+getAdminInfo():string |
Fetches the administrator data |
|
|
Game Menu |
|
|
20 |
-playerName:string |
Contains player name |
|
21 |
-round:int |
Contains round number |
|
22 |
-scores:int |
Contains all the scores |
|
23 |
-appearanceFlag:int |
To maintain the check for question repetition |
|
24 |
-difficultyId:int |
Responsible for storing the difficulty id |
|
25 |
-question:string |
Contains the question |
|
26 |
-bonusQuestion:string |
Contains the bonus question |
|
27 |
+signIn():void |
To sign in to the game |
|
28 |
+startGame():void |
To start the game |
|
29 |
+getHighScore():string |
To view the high scores |
|
30 |
+getBestScore():string |
To view the personal best score |
|
31 |
+addScore():void |
To save the score after each question |
|
32 |
+subtractScore():void |
To deduct the score if failed to answer the question correctly |
|
33 |
+startNextRound():void |
To progress towards the next round |
|
34 |
+answerBonusQuestion():void |
To answer the bonus question for extra points |
|
35 |
+raiseBet():void |
To raise the bet for the final round |
|
36 |
+signOut():void |
To sign out of the game |
|
37 |
+exitGame():void |
To exit the game
|
|
|
Questions |
|
|
38 |
-categoryID:int |
Contains the unique id of the category |
|
39 |
-question:string |
Contains the question |
|
40 |
-choice1:string |
Contains the choice one for the question |
|
41 |
-choice2:string |
Contains the choice two for the question |
|
42 |
-choice3:string |
Contains the choice three for the question |
|
43 |
-choice4:string |
Contains the choice four for the question |
|
44 |
-answer:string |
Contains the answer for the question |
|
45 |
-appearanceFlag:int |
To maintain the repetition log |
|
46 |
-difficultyId:int |
Contains the difficulty id of the question |
|
47 |
+getQuestion():string |
To get the first question of the round |
|
48 |
+getNextQuestion():string |
To get the next question |
|
|
Scores |
|
|
49 |
-scoreId:int |
Contains unique score id |
|
50 |
-playerId:int |
Contains unique player id |
|
51 |
-round:int |
Has the round number |
|
52 |
-score:int |
Contains score |
|
53 |
+getScore():void |
To view the score |
|
54 |
+setScore():void |
To save the score |
|
|
Difficulties |
|
|
55 |
-difficultyId:int |
Contains the difficulty id |
|
56 |
-difficultyName:string |
Contains the difficulty name |
|
57 |
-difficultyScore:int |
Contains the score associated with each difficulty |
|
58 |
+getDifficultyInfo():string |
To fetch the difficulty information |
|
|
Questions |
|
|
59 |
-questionId:int |
Has the question id |
|
60 |
-question:string |
Has the actual question |
|
61 |
+signIn():void |
To sign in to the settings menu |
|
62 |
+addQuestion():void |
To add a question |
|
63 |
+viewQuestions():string |
To view a questions list |
|
64 |
+updateQuestion():void |
To update a question |
|
65 |
+signOut():void |
To sign out |
Page 36 | 37