HW1

Assignment Due 23 April

NOTE: Partial credit is easier to give if your answers are verbose. Show lots of math and don't be afraid of using sentences.

  1. Examine the Vector object and the LinkedList object.(You may need to check out your texts or the java api on how to use these objects ). The question I have is, how efficient are these objects compared to our own linked list object. This is the task. Store 1,000,000 random integers in each of the three objects. Then report the time it takes for each object to complete. For our purposes, try to add the new numbers to the front of the list. Please submit your source code along with this. (10 pts)
  2. Exercise 3.20. I would like your lazy delete implementation to include delete, search, and toString functions. Please send the code. (15 pts)
  3. You are going to implement a stack interface . Please see chapter 3 in the text for a definition of a stack. Then implement a queue interface . Both implementations should use our linked list code. To implement one of these interfaces, make a new object that is a child of our linked list code and implements the interface. Therefore you you will want to send the two children that implement the interfaces. (10 pts)