Assignment 5
Due date: Monday, December 11.
NOTES:
- 10% penalty for each day late, up to three days
- This is an individual assignment; no groups allowed
This assignment requires JAVA object oriented techniques. You will practice the following data structures: Sorting and CompareTo.
Problem description
For this assignment you will use your data from the previous assignment. You will sort the collection of hashtags collected by your softare.
Requirements:
- Implement the interface Compare.
- Provide two different implementations for CompareTo. For example, in one of them you sort the hastags ignoring upper case: #SECChampionship and #seccampionship will be identicall; while in another case you sort first by length and for two strings of the same length you use lexicographical ordering: #iubb will be ahead of #BrunoMars (because the former's length is smaller than the latter's length) and #BrunoBars will be ahead of #BrunoMars.
- Implement one of the quadratic sorting algorithms discussed in class.
- You have four settings: two sorting algorithms (Java-Sorting and Your Sorting) and 2 CompareTo implementations. Take the cross product. Run your impletation of the four settings on your dataset. Record the running times.
Program input
- You need to have at least 1,000 hashtags. You can work in groups to create such a dataset. The Java implementation of the assignment is still an individual effort.
Program output
- Provide an one-page brief report.
- The report must include: (1) mention the quadratic algorithm that you implemented, (2) a description of the two CompareTo methods, and (3) a table where you show the times of the 4 settings described above.
Bonus points
- Use at least 10,000 hashtags.
- Implement another quadratic algorithm.
- Implement HeapSort.
- Update the report.