Describe the behavior of the java class

Assignment Help JAVA Programming
Reference no: EM13890892

Project: Complete exercise C-10.40 on p. 454 in the textbook. Read the problem statement carefully. The authors initially describe the behavior of the java.util.Hashmap class. As they describe it, the Java implementation of a Hash Map consists of a table (bucket array) of entries. Each entry consists of a K, V pair with the addition of a next reference that refers to a next entry in the bucket. In that way, if collisions have occurred and multiple entries/keys hash to the same bucket, they will be arranged in a singly linked list.

Data Structure Classes: Your job is to modify the ChainHashMap class of the textbook to exhibit the same behavior. You will be modifying the source code of the author's classes - so the first step will be to copy those files to your eclipse package. At a minimum I would recommend these:

1. Map.java

2. AbstractMapjava

3. UnsortedTableMap ava

4. AbstractHashMap.java

5. ChainHashMap.java

6. Entry.java

You can approach your solution in one of several different ways.

Some approaches might be:

1) modify Entry to include the extra field for the next reference. The method findIndex will need to utilize a hash value to find the appropriate bucket. Methods bucketGet and bucketPut will need to walk through the list as necessary looking for a key match.

or 2)instead of modifying Entry, modify UnsortedTableMap to create an array list of singly linked lists. Other methods will have to be modified as well to adapt the methods of the list class.

Test Driver: You will need to create a test driver. Create an implementation of Code Fragment 10.2, p. 405 in the textbook. Rather than reading from System.in, do file I/O with Java.

File Data and Name: In order to generate test data, you must use my file named ‘system.txt' that is in the Blackboard Information content area. You can ‘hard code' this name into your program - or better yet, pass the file name as a command line argument and read that within the test driver. And you might have to play around with ‘where' to put the file. Eclipse and Java don't necessarily look in the directory containing the code, but the directory above.

Reference no: EM13890892

Questions Cloud

Propose at least three control measures : Propose at least three control measures that organizations need to put in place to ensure that they remain complaint   With emerging technologies and in a continually changing IT environment.
Develop a use case diagram for renting acar : Develop a use case diagram for renting acar. Include actors representing a fleet mechanic, a rental agent, and acustomer, and use cases for  reportMechanicalProblems(),  orderRepairs(),  makeRepairs(),  makeReservation(),  rentCar(), andreturnCar().
Describe an important problem faced by society today : Describe an important problem faced by society today. Provide your own analysis of the problem in terms of each of the elements of thought as defined by Paul and Elder.
Do that masculinity and femininity are social constructs : Do you think that masculinity and femininity are social constructs, or are they biologically/genetically determined?
Describe the behavior of the java class : The authors initially describe the behavior of the java.util.Hashmap class. As they describe it, the Java implementation of a Hash Map consists of a table (bucket array) of entries. Each entry consists of a K, V pair with the addition of a next re..
Assignment in programming java : Assignment in programming (java). How to do the assignment at all. Some guidance on some steps to follow even maybe would help. I'm having a pretty hard time in the class being that I've never programmed prior to taking the course. I get the basic pi..
Calculate dells roe for the years ended february : Calculate Dell's ROE for the years ended February 3, 2012, and January 28, 2011. Round your ratio answers to two decimal places, and your percentage answers to one decimal place.
Determines the level of solar uv-b radiation : What determines the level of solar UV-B radiation at a specific place
Subscription revenue for the amounts received : a. Tao Co. receives $10,000 cash in advance for 4 months of legal services on October 1, 2013, and records it by debiting Cash and crediting Unearned Revenue both for $10,000.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd