
Java program
5165
€20/hr(approx. $23/hr)
- Posted:
- Proposals: 0
- Remote
- #138724
- Archived
Description
Experience Level: Intermediate
Write a Java Program to do the following: Prompt the user to enter integers one at a time.
The user should choose when to finish entering integers. The integers should be stored in an
array. The array should then be converted to a min heap. The user should then be presented
with a menu to insert an element, remove an element, display the array or exit the menu. If
the option chosen is insert the user should be prompted to insert an integer. The element
should be inserted in such a way as to leave a min heap. If the option chosen is remove, an
element should be removed from the min heap again leaving a min heap. The array should
be displayed to the user after each insertion or removal. The user should be presented with
the menu until they choose to exit. At least 4 methods should be coded, one to initialise the
min heap, one to insert an element, one to remove an element and one to display the array.
2. Write a Java Program that will implement the hashing by division algorithm. Prompt the
user to enter the number of buckets to be used in the hash table. This number should be
validated to ensure that it is an integer between 10 and 20. The user should then be
presented with a menu that gives them the option of inserting an element into the table,
removing an element from the table, searching for an element within the table or exiting the
program. If the user chooses to insert an element into the table the position in the table
should be determined using modulo arithmetic. Overflows should be handled using chains
or linked lists. If the user chooses to delete an element from the hash table, the position
within the hash table should be output to the user. If the user chooses to search for an
element within the table the position within the table should be displayed to the user if the
element is found or a suitable message if the element is not found. The elements within the
hash table should be displayed to the user after each insertion or deletion. The user should
be continually presented with the menu until they choose to exit the program. At least 5
methods, other than the main method should be coded, one to validate the number of
buckets in the hash table, one to insert an element into the hash table, one to remove an
element from the hash table, one to search the table for an element and one to display the
hash table.
The user should choose when to finish entering integers. The integers should be stored in an
array. The array should then be converted to a min heap. The user should then be presented
with a menu to insert an element, remove an element, display the array or exit the menu. If
the option chosen is insert the user should be prompted to insert an integer. The element
should be inserted in such a way as to leave a min heap. If the option chosen is remove, an
element should be removed from the min heap again leaving a min heap. The array should
be displayed to the user after each insertion or removal. The user should be presented with
the menu until they choose to exit. At least 4 methods should be coded, one to initialise the
min heap, one to insert an element, one to remove an element and one to display the array.
2. Write a Java Program that will implement the hashing by division algorithm. Prompt the
user to enter the number of buckets to be used in the hash table. This number should be
validated to ensure that it is an integer between 10 and 20. The user should then be
presented with a menu that gives them the option of inserting an element into the table,
removing an element from the table, searching for an element within the table or exiting the
program. If the user chooses to insert an element into the table the position in the table
should be determined using modulo arithmetic. Overflows should be handled using chains
or linked lists. If the user chooses to delete an element from the hash table, the position
within the hash table should be output to the user. If the user chooses to search for an
element within the table the position within the table should be displayed to the user if the
element is found or a suitable message if the element is not found. The elements within the
hash table should be displayed to the user after each insertion or deletion. The user should
be continually presented with the menu until they choose to exit the program. At least 5
methods, other than the main method should be coded, one to validate the number of
buckets in the hash table, one to insert an element into the hash table, one to remove an
element from the hash table, one to search the table for an element and one to display the
hash table.
Julia O.
0% (0)Projects Completed
-
Freelancers worked with
-
Projects awarded
0%
Last project
22 Jul 2026
Germany
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies