QuestionQuestion

Part I
QuickSort is an efficient sorting algorithm. Can you imagine a context when it is not a good choice?

Part II
Implementing Lists, Stacks, Queues and Priority Queues
A double linked list is a list for which besides the next element in the list, a pointer to the previous element is kept, at the level of each element.
A circular list is a list in which the last element is linked to the first element in the list.

Requirements: Design a circular double linked list, for which the following operations should be implemented:
o Search for a given element in the structure
o Insert an element after some element, specified as argument
o Delete an element specified as argument
o List all the elements present in the double linked list.
Approach: You should show the functionality by repeatedly inserting a few (at least 5) elements, followed by at least one search and one delete operation. After each operation performed, display the elements in the list. The elements should be displayed either in the output window of the IDE, or in a GUI.

Deliverables: You should submit (1) the souce (.java) files, (2) an output sample (screenshot showing program execution and the results of your testing) and (3) a document file describing your solution. The solution description document should include the following elements: a short problem analysis, main design decisions, user interface, testing and test cases, error handling and lessons learned. The size of the document should be of 1-2 pages, single spaced, font size 12. All solution description elements should be properly formatted using APA style.

Part III
1. There are two approaches for implementing the Stack class:
• Using inheritance
Implement the Stack by extending JCF ArrayList:
public class Stack<E> extends ArrayList<E> { ... }
• Using composition
Implement the Stack by defining a JCF ArrayList object as instance variable of the class Stack:
public class Stack<E> {
private ArrayList<E> = new ArrayList<E>();
...
}
Discuss the advantages and disadvantages for each of the two Stack implementations.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Report

1. Short problem analysis
a. We need to design a circular double linked list
b. This ADT provides these operations
i. Search for a given element in the structure
ii. Insert an element after some element, specified as argument
iii. Delete an element specified as argument
iv. List all the elements present in the double linked list.
c. This ADT is generic
2. Main design decisions
a. Declare an object of CircularDoubleLinkedList that uses Integer as data type
b. Insert 10 element into the list
c. Search for 5 in the list
d. List all element of the list
e. Delete every element of the list , show the list after each operation performs
3. User interface
a. I use console
b. Screenshot...
$50.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats