Implement a fastdefaultlist class that represent

Assignment Help JAVA Programming
Reference no: EM131268479

A Fast Default List

Starting with the SkipListList class, implement a FastDefaultList class that represents an infinite list with indices 0,1,2,3,...,∞ When we start, every value in this list is assigned the default value null. Otherwise, this class behaves just like a List; it has the add(i,x), remove(i), set(i,x), and get(i) that behave just like the same methods in a list. Each of these operations should run in O(log n) time. The size() method is already implemented for you, it returns the largest value you can store in an int

Again, this is not a hack job. First understand how the SkiplistList class works and figure out how you can modify it to do what this question asks.

Note: A DumbDefaultList class has already been implemented for you. You can use it to help test correctness of your implementation.

Hint: Work slowly. There is not much code you have to change in the FastDefaultList.java file (which is mostly just a copy of SkiplistList), but it is delicate. Checkpoint your work often and test carefully as you go.

Part II: Testing

Within the Tester class, write the following functions, all of which return true if all tests are successful or false if any test fails.

1 testPart1(t) function that tests if the Table t satisfies the requirements for Question 1:

1 This function should do all kinds of correctness tests.

2 This function should test that the performance of all operations is what it should be for a FasterTable

2 testPart2(dl) function that tests if the DefaultList dl satisfies the requirements for Question 2:

1 This function should do all kinds of correctness tests.

2 This function should test that the performance of all operations is what it should be for a FastDefaultList

Attachment:- DumbDefault.rar

Verified Expert

This assignment is about the linked list and its inbuilt function like set, get and the findpred. The program "FastDefaultList.java" is to be updated so that the methods like get, set and findPred behave like the internal linked list. Under this assignment, the functionality of get,set and the findPred functionality is provided.

Reference no: EM131268479

Questions Cloud

Determining the historical data : As the owner of a tennis club in a wealty community, you must decide on membership dues and fees for court time. Based on historical data, you understand that there are two types of tennis players in your community. "Serious" players with demand
Describe the current operational environment : Describe the Current Operational Environment. What are the impacts and what would be your military solution to obtaining the goals of the national security strategy?
Treated in the process of raising and slaughtering animals : Should people be vegetarian? If so, why? If not, is it relevant how animals are treated in the process of raising and slaughtering animals? Do we violate nature itself when we do acts such as mountaintop removal for coal, strip-mining, clear-cutting ..
What is the average number of customers : ENIN 331 - Simulation and Modeling Lab Assignment. About how many of each type of customer does Dan process per day? What is the average number of customers of each type waiting to get a haircut? What is the maximum
Implement a fastdefaultlist class that represent : Implement a FastDefaultList class that represents an infinite list with indices 0,1,2,3,...,∞ When we start, every value in this list is assigned the default value null.
Find the error probability for an fh spread spectrum : The interference on the channel is AWGN. The FSK demodulator outputs are square-law-detected and passed to the decoder, which performs optimum soft-decision Viterbi decoding as described in Chapter 8. Assume that the hopping rate is 1 hop per code..
Social marketing focuses on changing individual behavior : Social Marketing focuses on changing individual behavior rather than changing the system, which is currently the more dominant CQI approach (see Berwick). Argue the pros and cons of individual versus systems change
What are the three levels of the federal court system : What are the three levels of the federal court system? Does the United States Supreme Court hear every case that is appealed to it from the State and Federal Courts?
What is the processing gain for the system : A slow FH binary FSK system with noncoherent detection operates at Eb/J0 = 10, with a hopping bandwidth of 2 GHz, and a bit rate of 10 kbits/s.

Reviews

inf1268479

11/7/2016 7:14:59 AM

i need help with the fastdefaultlist only- The FindPred, get and set methods. i'm expecting it in about 15 hours. if its okay, please let me know. infect if i can get help with only the FindPred method, that'll be fine. the expert shouldn't change the package and the methods. i need help with the FindPred, get and set methods and the package should remain as comp2402a3. Testing Part 2. Test for Part 2 Correctness took 0.100000 seconds. Exception for Part 2 Correctness: java.lang.IndexOutOfBoundsException java.lang.IndexOutOfBoundsException at comp2402a3.FastDefaultList.set(FastDefaultList.java:105) at a3checker.Part2CorrectTest.test(Part2CorrectTest.java:25) at checker.AtomicTest$RunnableTest.run(AtomicTest.java:95) at java.lang.Thread.run(Thread.java:745)

len1268479

11/7/2016 1:31:56 AM

Everything needed is in zip file. i need help on just the FastDefaultList only - There is not much code you have to change in the FastDefaultList.java file (which is mostly just a copy of SkiplistList), but it is delicate

Write a Review

JAVA Programming Questions & Answers

  Design the logic and write the rest of the program

Design the logic and write the rest of the program using a nested statement.  They are using JOptionPane.showInputDialog.

  Design a program that extends the definition of the class

Design a program that extends the definition of the class JFrame to display a window on the screen. Name your class PropertyTax1, title your window "Calculation of Property Taxes," set the window's width to 400 pixels and height to 300 pixels, and te..

  Write a method compact that removes all zeroes

Write a program that reads a text file (compact.txt) and stores the integers in an array.  Your instructor will provide this text file.

  Change the implementation of the gettax method

Change the implementation of the getTax method in the TaxReturn class, by setting a variable rate1limit, depending on the marital status. Then have a single formula that computes the tax, depending on the income and the limit.

  Create a data set with 100 integer values.

Create a data set with 100 integer values. Create a program that uses the division method of hashing to store the data values into hash tables with table sizes of 7,,51 and 151. Use the linear probing method of collision resolution. Print out the ..

  Opening the file shows the output below

If the program runs successfully, the only message your program prints on screen is "Output file has been created: Unicode.dat' but opening the file shows the output below.

  Java application which creates bank records

Write down a java application which creates 10000 bank records and the allow user ti enter a balance and customer account info. using a an account number.

  How is singlethreadmodel implemented in tomcat

How is SingleThreadModel implemented in Tomcat? In other containers? I would assume that Tomcat uses its connection thread pool, and creates a new instance of the servlet for each connection thread.

  Write down a java application which inputs three integers

write a java application that inputs three integers from the user and displays the sum average product smallest and

  Identifing the appropriate class names, attributes & methods

I am having problems identifing the appropriate class names, attributes and methods for the following objects. I need at least 3 attributes and 3 methods for each class.

  Accepts a binary number from the user

Write a Java test program that accepts a binary number from the user. You should store the binary number in a String. Your program should then use afor loop to sequence through every character in the String, counting the number of ones, zeros, and..

  Implement a class account

Implement a class Account. An account has abalance, functions toadd, andwithdrawmoney

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