In the HashTable functions, we had to make sure the client’s hash function did not produce an index outside of the array; yet, we didn’t need a size variable as a private member of HashTable because:

A. the client knows what size the hash table is
B. the Array used for the hash table has a length function
C. if the hash function is faulty, the index produced must be less than 0
D. we require that the client thoroughly test the hash function


B

Computer Science & Information Technology

You might also like to view...

Create an application that mimics the functionality of a vending machine. Your application’s GUI has been completed for you (Fig. 14.18). Store the prices of each item for sale in the vending machine in an instance variable. Also, add the code that will display the price of an item when the item’s number has been entered and Enter JButton has been clicked.




a) Copying the template to your working directory. Copy the C:Exam- plesTutorial14ExercisesVendingMachine2 directory to your C:SimplyJava directory.
b) Opening the template file. Open the VendingMachine.java file in your text editor. c) Adding instance variables. After the last GUI component is declared (line 53),
declare private String instance variables to store the prices of each of the snacks.
Each String should be in the form "$0.00" where the price of the snack is substi- tuted for the zeros. The variables’ names and prices should be snackPrice1 ("$1.25"), snackPrice2 ("$0.50"), snackPrice3 ("$1.25"), snackPrice4 ("$1.00"), snackPrice5 ("$1.25"), snackPrice6 ("$1.25"), snackPrice7 ("$1.00") and snackPrice8 ("$0.50").
d) Coding the enterJButtonActionPerformed method. Locate the enterJButtonAc- tionPerformed method. In this method, store the user input entered in the inputJ- TextField. Then, use a switch statement to di

Computer Science & Information Technology

A printer can be ________ on a network to eliminate purchase of additional equipment

Fill in the blank(s) with correct word

Computer Science & Information Technology

Preventing a table from being opened directly requires hiding the ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

If a newly created tab is to the right of the desired location on the Ribbon, you can reposition it by using the ________ button

A) Move Right B) Move Down C) Move Up D) Move Left

Computer Science & Information Technology