Reference no: EM133618457
Question: Develop a Java program that meets the following requirements:
1. Assume that you will be implementing Java software to track attendees for a conference: if the guest's identifying information is found, they are allowed to enter. A guest's identifier includes their full name and then an integer to represent their guest category number.
Based on your experience with the hash set and hash map data structures, decide whether to use a hash map or hash set for step 2 for this task for most effective programming.
Briefly explain in code comments on your class your reasoning for the choice.
For example, a guest identifier could be: FrankSmith3992
2. Implement a main method in your class that includes code to meet the following requirements:
(a) Develop a MyhashMap or MyHashSet data structure object based on your choice in step 1 that allows to simulate checking whether the
guest's identifier (a String) is in the conference records.
For example, the guest presents the identifier FrankSmith3992, and a volunteer checks to see if the identifer is on the list of approved guests.
HINT: review the TestMyHashMap and TestMyHashSet example code carefully
(b) Insert data for at least four guests into your data structure, ensuring that some but not all guests share the same category
For example, the two guest identifiers FrankSmith3992 and
BillJones3992 share the same category
HINT: check for the methods defined in your chosen data structure Java class to see which could be used for this step and the following.
OPTIONAL ADVANCED: you could even implement a custom Java class for the guest information, so that various information is stored in
one guest object.
(c) Print out every guest's name and category information from the datastructure, and simulate checking whether one guest identifier is in therecords using data structure operations.
(d) Using the same guest data, develop vertex data for an unweighted graph object in which the vertex data are guest names and an
edge exists between two guests if the two guests have the same category.
Make an unweighted graph object using your data
HINT: Review TestGraph.java. carefully, including the constructor methods. It is NOT required that you automate the creation of vertex
data: it can be done manually
(e) Using graph data structure operations, print out basic information about your graph including its size
(f) Run either a depth first or breadth first traversal in your graph, starting at a particular guest id (vertex) of your choice, and print out
the order of vertices visited
Review the TestBFS and TestDFS examples. Note that an internal SearchTree type is used to hold the result of the traversal. Did the traversal reach all of the guests? If not, think about why.