Question: Module 11.4 | Challenge The SetTest Application Overview In this challenge, we revisit the concept of hashing with the Java HashSet. You will create a

 Module 11.4 | Challenge The SetTest Application Overview In this challenge,we revisit the concept of hashing with the Java HashSet. You will

Module 11.4 | Challenge The SetTest Application Overview In this challenge, we revisit the concept of hashing with the Java HashSet. You will create a SetTest application that demonstrates creating and processing a generic Set limited to String objects, with the Set implemented as a HashSet. The application will include an inputSetNames method, a displaySetNames method, and a searchSetNames method Specifications Create the skeleton for a program called SetTest. Declare a private static Scanner object. In method main, declare a generic Set called names that only accepts String objects. Use the Set implementation java.util.HashSet. . In method main, display a message explaining that a Set of names will be entered, displayed and searched Call the method to input the names o Prompt and read the first name o Add the name to the names Set Continue prompting and reading names until the user types "end". Add each name to the names Set after user entry o o Call the method to display the names Set. Call the method to search for a name in the names Set o Prompt and read a search name o Display the proper message indicating whether the search name was found Hint: use the Set contains method The user can continue to search for another name or enter "end" when finished searching o Additional Requirements Perform a short Internet search on HashSets and HashMaps and add a comment at the end of your program with a response to this question . o What are the differences in the way HashSet and HashMap are internally implemented in Java? Do you think HashSet is preferred to HashMap for storing a collection of names? Why or why not? Cite your sources. Follow the in Include a comment section at the top of your program with your student ID, name, and title of the program Submit your source code and sample output by clicking on "11.4 | Challenge" and uploading a zip file with your source code and a screenshot of your output. Name your file using this format: lastname ID_2043_M11C.zip

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 Databases Questions!