Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Language: Java Please help The SetTest Application Overview In this challenge, we revisit the concept of hashing with the Java HashSet. You will create
Programming Language: Java
Please help
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. . Prompt and read the first name. o Add the name to the names Set. o Continue prompting and reading names until the user types "end" o Add each name to the names Set after user entry. Call the method to display the names Set. Call the method to search for a name in the names Set. . Prompt and read a search name. 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 o oStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started