-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.txt
executable file
·1 lines (1 loc) · 3.01 KB
/
test.txt
1
assignment implement the three self-organizing list heuristics count whenever a record is accessed it may move toward the front of the list if its number of accesses becomes greater than the record(s) in front of it move to front whenever a record is accessed it is moved to the front of the list this heuristic only works well with linked lists because in arrays the cost of shifting all the records down one spot every time you move a record to the front is too expensive transpose whenever the record is accessed swap it with the record immediately in front of it compare the cost of each heuristic by keeping track of the number of compares required when searching the list additional instructions use the linked list files i provide they are from the book to implement your self ordered lists you may incorporate the authors linked list implementation via inheritance or composition which ever makes the most sense to you i will not evaluate that aspect of your implementation you are allowed to make changes to any of the files i have provided to make your implementation cleaner. the same applies to the the link node implementation you may not change i want you to run two tests the first test is with types use the add function to build a list in the following order after you have built that initial list i want you to use the find function to input the following characters for each heuristic display the order of the final list and the number of compares the second test is using the test file i provide using the data type string. do not modify the test text file because i am going to compare your results with my own and modifying the test file will throw your results off for this test i want you to do the following for each heuristic a add the first words not the entire file using your find function and then print out the total number of words in your list the total number of compares and the first words in your list along with their frequency submit to receive credit for this assignment you must submit the following files in a zip file to blackboard word document describing your approach and calling out changes you made to any of the files i have given you any source files you have changed your executable file the output of your executable run either in screen shots or an output text file rubrics to earn any credit at all you must submit a working program that implements at least one of the heuristics and it must be submitted on time you must also include all the files i ask for above or you will not receive any credit you must also use the i have provided unchanged by establishing an inheritance relationship between your self ordered lists and the failure to do so will disqualify your project and you will not receive any credit for it for any function that is implemented in your source file but not demonstrated via testing you will receive partial credit not to exceed fifty percent of the value for that function methods that are commented out are considered unimplemented and you will not receive any credit for them