Question: 1 . Continuing with game programming theme, implement Java code to use either MyHashSet or MyHashMap to store ( only ) the integer IDs of
Continuing with game programming theme, implement Java code to use either MyHashSet or MyHashMap to store only the integer IDs of the other members of the team the player is currently a member of the player can join different teams as the game progresses Use your judgement to choose the most effective of MyHashSet or MyHashMap, include a concise explanation in comments, choose ID numbers for four simulated game characters including your main players ID and create one team id data structure object according to your choice to hold the current IDs of the other members of the players team, insert your own unique data into the data structure to define the other members of their current team, excluding at least one of the other characters.
Print out the characters ID and the ID numbers of the characters current team
from the team data structure made in step and any other data associated with
their ID number as you wish in an informative message
Simulated the player joining a new team by manipulating the data structure created in step using its standard operations to change the IDs of the other characters, and then again print the players and other team members IDs in an informative message.
Create an unweighted graph object to represent the same current team status
set in the above step, where the vertex data are user identifiers and an edge
exists between two vertices if the two characters currently share a team.
Run either a depth first or breadth first traversal in your graph, starting at the
vertex that contains the players user ID including printouts.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
