1 linked listsin this problem you will write a class that

Assignment Help JAVA Programming
Reference no: EM13350360

1: Linked Lists

In this problem you will write a class that implements an ordered list of Strings. Your class will able to add and remove elements in the list at arbitrary positions. Your implementation will use linked lists and recursion (when appropriate). Your implementation should be ecient.

Create a Java class called LinkedList that extends the LinkedListABS class. Your class must have a public constructor that has zero arguments (which creates an empty list of Strings). You may add as many private attributes and helper methods in your class as you need. You are not allowed to use an array, ArrayList, or any other container class that Java provides to store your list. You must use a linked list with the Node class provided. Mark breakdown: style:5, correctness:15

2: Copy

In the provided CopyLinkedList class, implement the copy() method as described. The resulting (copied) list should not share any memory with the input list. (That is, the list that makes up the copy must have its own Nodes.) Mark breakdown: correctness:10

3: Queue

In this problem you will implement a queue of Strings using a linked list. For this you will need to decide how to deal with adding and removing nodes (in a FIFO manner) eciently.

Your enqueue and dequeue methods should not use recursion (or iteration). A queue with less Strings in it is smaller (less than) a queue with more Strings. Two empty queues are considered the same. If two queues have the same size (bigger than 0), the order is determined alphabetically using the rst string in each queue.

Create a Java class called Queue that extends the provided QueueABS class. Your class must have a zero argument constructor that creates an empty queue. Your implementation must use linked lists with the Node class provided. Do not use recursion or iteration in your method, unless otherwise told to do so (in the toString() method for example). Your methods must be ecient.

4: Mergesort

In this problem, you will implement the mergesort sorting algorithm using linked lists.

Complete the methods in the Merge class that is provided. Your nal method (sort()) is the mergesort method. It will sort lists of Strings alphabetically. It should use both the merge() and split() methods in it. (You will also need the copy() method from the CopyLinkedList class.)

Reference no: EM13350360

Questions Cloud

You have to review vhhr and fill me in with suggestions : you have to review vhhr and fill me in with suggestions based on your views on the feedback and website based on
Question 1 companies and business planningfwpl acquired the : question 1 companies and business planningfwpl acquired the winery business in 1981 from francesca and angelo galli.
This paper is called a jury paper this is related to : this paper is called a jury paper. this is related to experimental psychology. this paper needs to be 8-10 pages
Part-11 exceptions and exception handlinggt create a java : part-11 exceptions and exception handlinggt create a java class called samearraysexception that extends the exception
1 linked listsin this problem you will write a class that : 1 linked listsin this problem you will write a class that implements an ordered list of strings. your class will able
Going live is not the end of the erp journeythe benefits : going live is not the end of the erp journeythe benefits companies expect from their erp systems often occur over a
Part-1inheritance write code using eclipse and output : part-1inheritance write code using eclipse and output screenimplement a subclass square that extends the rectangle
Write the code with comment and output resultinterface and : write the code with comment and output resultinterface and polymorphismimplement a class quiz that implements the
Write the code and output result1 real cash register can : write the code and output result.1. real cash register can handle both bills and coins. design a single class that

Reviews

Write a Review

JAVA Programming Questions & Answers

  Values that occur just once

This list has some values that occur just once (1, 3, 4, 11, 13, 18), some values that occur twice (9, 16), some values that occur three times (14, 19) and a single value that occurs four times (7). Therefore, the call of list.maxCount() should re..

  Driveway is a "last-in, first-out" stack. of course

Driveway is a "last-in, first-out" stack. Of course, when a car owner retrieves a vehicle that wasn't the last one in, the cars blocking it must temporarily move to the street so that the requested vehicle can leave. Write a program in Java that m..

  Java program that computes a ride you took in taxi

Write a java program that computes a ride you took in taxi. The bill computed based on an initial cost plus the taxi charges 0.5 dirham every 0.3 km.

  Implement a method with three arguments

Implement a method with three arguments: a graph, a starting vertex number, and an ending vertex number. The method determines whether there is a directed path from the starting vertex to the ending vertex.

  Java code using jframe

Write a Java code using JFrame. This code needs to manipulate 4 shapes(2 rectangles and 2 squares) in a 400x400 JFrame. This needs to manipulate the shapes in 3 different ways, using 3 different methods. One for translating a shape, one for proportio..

  Create a data set with 100 integer values.

Create a data set with 100 integer values. Create a program that uses the division method of hashing to store the data values into hash tables with table sizes of 7,,51 and 151. Use the linear probing method of collision resolution. Print out the ..

  It should have an if statement

The following are hints given: It should have an if statement. This add method determines what number greater than or less than the other number, than it adds the positive or negative. I think this should be a private method.

  Marketing necessary for practice-hospital to successful

Why is marketing necessary for a practice or hospital to be successful? What considerations should be taken into account when marketing health care services or products? (Hint think about all the medication ads you seen on tv or in magazines)

  Application that simulates a cash register

Implement a graphical application that simulates a cash register. Provide a text field for the item price and two buttons for adding the item to the sale, one for taxable items and one for nontaxable items. In a text area, display the register tap..

  Simple java application that uses the string

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

  Structure named dog with a string field

Create a Structure named dog with a string field for the Dog's name. Create a Structure named Cat with a string field for the Cat's name. Write a program that declares one Dog and one Cat, and assign names to them. Write two overloaded functions n..

  Overview in this assignment you are provided with an

overview in this assignment you are provided with an interface that contains a generic type.you are asked to create two

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd