Why Choose Us?
0% AI Guarantee
Human-written only.
24/7 Support
Anytime, anywhere.
Plagiarism Free
100% Original.
Expert Tutors
Masters & PhDs.
100% Confidential
Your privacy matters.
On-Time Delivery
Never miss a deadline.
All code must be written by you, although you can use the lecture notes (and lab exercises), textbooks, and the Oracle Java website for guidance
All code must be written by you, although you can use the lecture notes (and lab exercises), textbooks, and the Oracle Java website for guidance. (1) Stop words are high-frequency words that are removed from the representation of natural language data. Write a method deleteStopwords(input, stopwords) that deletes a list of words stopwords from some text input. It is up to you whether your method expects input to be a referring to the source of the text to be processed, or a String or ArrayList of words; similarly, for the stopwords parameter. However, you should try to optimise the data structure used. Your method should return an ArrayList containing the non-stop words identified. Your method should work successfully with the contents of the input file Input.txt and the stop words listed in the file stopwords.txt
(both files are available on Learning Central).
(2) Implement the insertion sort algorithm to sort the words obtained from Question (1) in alphabetical order (the pseudocode for this method is available in the lecture notes). The Java method for insertion sort should be named insertionSort(listofWords).
(Functionality: 7, Design: 4, Ease of use: 2, Presentation: 2)
(3) Implement the merge sort algorithm to sort the words obtained from Question (1) above in alphabetical order (the pseudocode for this method is available in the lecture notes). The Java method for merge sort should be named mergeSort(listofWords).
(Functionality: 10, Design: 5, Ease of use: 3, Presentation: 2)
(4) Write a Java method to measure the performance of the insertion sort and merge sort Java methods from Questions (2) and (3), respectively, by: • Measuring time that is needed to sort the first 100 of the words, first 200 of the words, and first 500 of the words by each of the two algorithms. • Counting the moves and/or swaps that occur while sorting elements.
(Before attempting this exercise, you should work through the Algorithms lab exercises, available on Learning Central. The techniques used there will help you to work out how to approach this part of the coursework, in particular there are examples on how to time algorithms and count the moves and swaps.)
(5) You should create two methods for a data structure implementing a Queue as a circular array. Your data structure should have the class name MyArrayQueue. The two methods that should be implemented are: a) Adding element to the queue: public void enqueue(Object theElement) {…}
(Functionality: 15, Design: 2, Ease of use: 2, Presentation: 1
(Functionality: 15, Design: 2, Ease of use: 2, Presentation: 1
public Object dequeue() {…}
(Functionality: 6, Design: 2, Ease of use: 1, Presentation: 1) In both methods errors should be handled properly. For example what happens when adding an element to a full queue? There will be skeleton code for MyArrayQueue available on Learning central that contains the MyArrayQueue class with the following fully implemented methods: constructor, isEmpty(), getFrontElement(), getRearElement() methods. It also includes signatures of two methods that you should implement: enqueue(Object theElement) & dequeue().
(Functionality: 6, Design: 2, Ease of use: 1, Presentation: 1) In both methods errors should be handled properly. For example what happens when adding an element to a full queue? There will be skeleton code for MyArrayQueue available on Learning central that contains the MyArrayQueue class with the following fully implemented methods: constructor, isEmpty(), getFrontElement(), getRearElement() methods. It also includes signatures of two methods that you should implement: enqueue(Object theElement) & dequeue().
Learning Outcomes Assessed • Implement basic data structures and algorithms • Analyse and describe the performance of data-structures and algorithms Code Reuse Your solutions may make use of any classes in the Core Java API. You may also reproduce small pieces of code from: • The CM1210 course handouts and solutions • java.oracle.com • any textbooks provided: • The section reproduced does not form the entire solution to a single question • The source of the code is clearly referenced in your source code • Your code is commented to demonstrate clearly that you understand how the reproduced code works (i.e., explain why particular types have been selected, why other language features have been used, etc.
Expert Solution
Please dwonload the answer file using this link
https://drive.google.com/file/d/1hBEVVvX-SMfot6TE61PBujAygVm0UZzt/view?usp=sharing
Archived Solution
You have full access to this solution. To save a copy with all formatting and attachments, use the button below.
For ready-to-submit work, please order a fresh solution below.





