Java this time!! Linked List
#1
Scooby Regular
Thread Starter
Join Date: Feb 2002
Location: Lurkin Somewhere
Posts: 7,951
Likes: 0
Received 0 Likes
on
0 Posts
Just noticed ive till friday to do......
Project B
You decide that your solution to project A will be too slow to be useful when used with a real telephone directory and make the following changes to attempt to improve the performance of your program (a sample solution to Project A will be made available if you require it).
1). Provide an implementation of the Directory interface using the LinkedList class described in lectures (NOT the Java Collections List Class). You MUST NOT CHANGE the LinkedList class – marks will be deducted for anyone whose solution relies upon changing the LinkedList or LinkedListIterator implementation given.
2). The changes in 1) should make adding, deleting and modifying records more efficient but will probably increase the time to lookup numbers. To overcome this you use a technique called hashing. Instead of storing all the records on one list you use a series of lists. The data for all people whose surname begins with ‘A’ is stored on the first list, records for all people whose surname begins with ‘B’ on a second list and so on. Provide an implementation of the Directory interface using this technique.
Again, you should measure the performance for the best, worst and average cases of implementations 1) and 2) above. Compare the efficiency of each implementation in your documentation
****
Any ideas?
Project B
You decide that your solution to project A will be too slow to be useful when used with a real telephone directory and make the following changes to attempt to improve the performance of your program (a sample solution to Project A will be made available if you require it).
1). Provide an implementation of the Directory interface using the LinkedList class described in lectures (NOT the Java Collections List Class). You MUST NOT CHANGE the LinkedList class – marks will be deducted for anyone whose solution relies upon changing the LinkedList or LinkedListIterator implementation given.
2). The changes in 1) should make adding, deleting and modifying records more efficient but will probably increase the time to lookup numbers. To overcome this you use a technique called hashing. Instead of storing all the records on one list you use a series of lists. The data for all people whose surname begins with ‘A’ is stored on the first list, records for all people whose surname begins with ‘B’ on a second list and so on. Provide an implementation of the Directory interface using this technique.
Again, you should measure the performance for the best, worst and average cases of implementations 1) and 2) above. Compare the efficiency of each implementation in your documentation
****
Any ideas?
Thread
Thread Starter
Forum
Replies
Last Post