Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Methods: public Shipping Service(int size) Create an array of shipments and save the size of the hash table. public int hashFun(String address) Split the string

image text in transcribed
Methods: public Shipping Service(int size) Create an array of shipments and save the size of the hash table. public int hashFun(String address) Split the string address, based on underscore, to get the area. Then, find the summation of characters ASCII values of area and return the hash key. public boolean insert(Shipment s) Insert the shipment s in the proper location and return true. When a collision happens, use linear or quadratic propping. If the hash table is full, return false. public void printTable() Call toString() method and print the contents of the Hash Table as shown in the sample output public int countArea(String area) Count and return the number of shipments in the given area. public void printCustomers(String area) Print all customers' names in the given area. 3) Class Shipping Test In the main method, create an object of class Shipping Service with size = 13. Display a menu of choices, as shown in the sample output. Add your sample output as a comment at the end of the test class. Add comments before each method. Methods: public Shipping Service(int size) Create an array of shipments and save the size of the hash table. public int hashFun(String address) Split the string address, based on underscore, to get the area. Then, find the summation of characters ASCII values of area and return the hash key. public boolean insert(Shipment s) Insert the shipment s in the proper location and return true. When a collision happens, use linear or quadratic propping. If the hash table is full, return false. public void printTable() Call toString() method and print the contents of the Hash Table as shown in the sample output public int countArea(String area) Count and return the number of shipments in the given area. public void printCustomers(String area) Print all customers' names in the given area. 3) Class Shipping Test In the main method, create an object of class Shipping Service with size = 13. Display a menu of choices, as shown in the sample output. Add your sample output as a comment at the end of the test class. Add comments before each method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions