Question: Exercise 2: Modify the Exercise 1 so that the server will keeps players and the played games in a database. A player includes, an ID,

Exercise 2:

Modify the Exercise 1 so that the server will keeps players and the played games in a database. A player includes, an ID, and a name. A played game includes, an ID of the first player, an ID of the second player, the starting time of the game (for example 2020/5/13 17:20), the result of the game (1 if the first player won, 2 if the second player won, and 0 if the game has not been accomplished), the number of turns played.

In this exercise, we assume that:

  • the player will enter his ID instead of his name. If the player is unrecognized he/she will be asked to enter his/her name in order to be added in the database.
  • for each player, and before starting the game the server will extract and display the following information:

oPlayer name

oTotal number of games played by this player so far

oBest performance: Lowest number of turns played as a winner (if it exists)

You are required to:

  • Create a copy from the previous exercise
  • Create an embedded derby database in the server called'DBGAME'
  • Do the necessary changes at the server side as well as the client side

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!