A person wants to play online games. Get the number of times he needs to play the game. Permit him to play the game till the count is exceeded. Two types of games can be played namely ‘Game 1’ and ‘Game 2’. Create a base class ‘Game’. From class, ‘Game’, two classes ‘Game 1’ and ‘Game 2’ can be derived. Each time the player plays the game a unique integer id is created for each match. Get the details like name, phone number, score obtained for both games. Find the credit obtained and display it along with the report. For each match, a score is get as input from the player and credits are given based on the following criteria.ScoreCredits<1001100 to 1502150 to 2003200 to 2504Only for the ‘Game 2’ get the mail id too. If the mail id is having any ‘( ‘ symbol remove it and format the mail id and print the formatted mail id.
Question
A person wants to play online games. Get the number of times he needs to play the game. Permit him to play the game till the count is exceeded. Two types of games can be played namely ‘Game 1’ and ‘Game 2’. Create a base class ‘Game’. From class, ‘Game’, two classes ‘Game 1’ and ‘Game 2’ can be derived. Each time the player plays the game a unique integer id is created for each match. Get the details like name, phone number, score obtained for both games. Find the credit obtained and display it along with the report. For each match, a score is get as input from the player and credits are given based on the following criteria.ScoreCredits<1001100 to 1502150 to 2003200 to 2504Only for the ‘Game 2’ get the mail id too. If the mail id is having any ‘( ‘ symbol remove it and format the mail id and print the formatted mail id.
Solution
I'm sorry, but you didn't provide any text for me to respond to. Could you please provide the text?
Similar Questions
For each match, a score is get as input from the player and credits are given based on the following criteria.ScoreCredits<1001100 to 1502150 to 2003200 to 2504Only for the ‘Game 2’ get the mail id too. If the mail id is having any ‘( ‘ symbol remove it and format the mail id and print the formatted mail id.
Game Play Analysis IIITable: ActivityColumn NameTypeplayer_idintdevice_idintevent_datedategames_playedint(player_id, event_date) is the primary key of this table.This table shows the activity of players of some game. Each row is a record of a player who logged in and played a number of games (possibly 0) before logging out on some day using some device.Write an SQL query that reports for each player and date, how many games played so far by the player. That is, the total number of games played by the player until that date. Check the example for clarity.The query result format is in the following example:Activity table:player_iddevice_idevent_idgames_played122016-03-015122016-05-026132017-06-251312016-03-020342018-07-035Result table:player_idevent_dategames_played_so_far12016-03-01512016-05-021112017-06-251232016-03-02032018-07-035For the player with id 1, 5+6=11 games played by 2016-05-02, and 5+6+1=12 games played by 2017-06-25. For the player with id 3, 0+5=5 games played by 2018-07-03. Note that for each player we only care about the days when the player logged in.Optionsselect player_id, event_date, games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a,) as t;select games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;select player_id, event_date, games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;select player_id, event_date, games_played_so_far select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;Finish
Table: ActivityColumn NameTypeplayer_idintdevice_idintevent_datedategames_playedint(player_id, event_date) is the primary key of this table.This table shows the activity of players of some game. Each row is a record of a player who logged in and played a number of games (possibly 0) before logging out on some day using some device.Write an SQL query that reports for each player and date, how many games played so far by the player. That is, the total number of games played by the player until that date. Check the example for clarity.The query result format is in the following example:Activity table:player_iddevice_idevent_idgames_played122016-03-015122016-05-026132017-06-251312016-03-020342018-07-035Result table:player_idevent_dategames_played_so_far12016-03-01512016-05-021112017-06-251232016-03-02032018-07-035For the player with id 1, 5+6=11 games played by 2016-05-02, and 5+6+1=12 games played by 2017-06-25. For the player with id 3, 0+5=5 games played by 2018-07-03. Note that for each player we only care about the days when the player logged in.Optionsselect games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;select player_id, event_date, games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;select player_id, event_date, games_played_so_far select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a, (select @player := -1, @games := 0) as tmp) as t;select player_id, event_date, games_played_so_farfrom ( select player_id, event_date, @games := if(player_id = @player, @games + games_played, games_played) as games_played_so_far, @player := player_id from (select * from Activity order by player_id, event_date) as a,) as t;
Player classThe Player class will specify the attributes and behaviours of a player. An object of the Player class will have at least the following fields:Name – the name of the playerScore – the highest game score The data type of each field must be chosen carefully and you must be able to justify the choice of the data type of the fields. You may want to include comments in the class to state any assumptions made. The class must also have a default constructor and a non-default constructor that accepts a value for the name of the player.The Player class should also have appropriate accessor and mutator methods for its fields. Validation of values for fields should also be implemented. You should not allow an object of class Player to be set to an invalid state. There should be no input from the terminal or output to the screen via methods from the Player class. A Player object should also be able to return its state in the form of a String.
Sports Craft Company has organized tournaments in multiple individual sports and invited top ranked players to play. Each tournament comprises of multiple matches in knock out format. Each match is played between two players.Problem Statement: Create the Player table as per information provided below:Column Name Data Type Constraint DescriptionPId INTEGER PRIMARY KEY Unique player Id is mandatory for every playerPName VARCHAR2(20) NOT NULL Player NameRanking INTEGER Player's ranking
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.