Write a program using linkedlist and listiterator

Assignment Help Basic Computer Science
Reference no: EM131018434

Question 1:

:*Write a program using LinkedList and ListIterator to obtain the following statements:

1. Create a linked list named "number" with these elements: "one", "four" and "three".

2. Create a List Iterator named "it1" related to "number".

3. Add the new element "two" after the element "one"

4. Remove the element "four"

5. Create a new List Iterator named "it2" related to "number", to add new elements in the

respective positions. To create each new element you must use the value of the current

element concatenated to " and a half".

The new obtained list is:

one

one and a half

two

two and a half

three

three and a half

Question 2 :

*To solve this question, you can use the doubly LinkedList Class from your book, or any other
implementation.
Add the following changes to the doubly LinkedList Class:
1. Override the toString() method.
2. Implement getSize() method, which returns the current size of the linked list (remember
that you need to make core changes to the code)
3. Implement another toString method with the name reverseToString(), this method should
return a string of the data within the linked list but in reverse order.
4. Implement a sort() method to sort LinkedList. You can use any sort algorithm or any trick
to sort LinkedList (think outside the box).
5. The attached LinkedListTester class must work with your implementation.

Reference no: EM131018434

Questions Cloud

Which of the following is not a type of constructor : Which of the following is not a type of constructor? A. Copy constructor B. Friend constructor
Show in steps how quicksort algorithm : Show in steps how Quicksort Algorithm works to sort the following array... 7   5    4   8   6   3   5    9
Consider a desktop publishing system : Consider a desktop publishing system used to produce documents for various organizations. Give an example of a type of publication for which confidentiality of the stored data is the most important requirement;a type of publication in which data inte..
Compare and contrast the cultures of b-med and mm healthcare : Being that the two sets of employees came from different regions (i.e., Miami and Trinidad), explain the role of national culture in understanding the organizational culture issues in this case. What could have been done to ensure that both cultur..
Write a program using linkedlist and listiterator : Write a program using LinkedList and ListIterator to obtain the following statements:1. Create a linked list named "number" with these elements: "one", "four" and "three".2. Create a List Iterator named "it1" related to "number".
Analyze corporate strategy and the project life cycle phases : Analyze corporate strategy and the project life cycle phases to define the project and initiate a project plan. Write clearly and concisely about project management using proper writing mechanics.
Write down an explanation of the meaning of MC : With two goods, X and Y, what is the utility-maximizing formula - what, in words, is the profit-maximization rule and write down an explanation of the meaning of MC
A maximum internet speed : One of the current dongles (modem) that the MTN mobile network provides has a maximum internet speed of 7.2 Mps. How many Kilobytes of data can you download in a minute using such an internet connection? [10 Marks] 2. The MAC address of a WiFi networ..
Evaluate the channels of distribution : Evaluate the channels of distribution you will use to sell your product along with a description of how each channel partner will add value.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Possibilities curve between health and all other goods

Draw a production possibilities curve between health and all other goods

  Transfers control to the operating system

When an interrupt or a system call transfers control to the operating system, a kernel stack area separate from the stack of the interrupted process is generally used. Why?

  Write the linearlist class

For this assignment, you will write the LinearList class, a singly linked list based implementation of the LinearListADT interface (given below). A 'list' is a sequence of values. The ordering of the items in the list is not specified but does matter..

  Essay on the topic of digital divide crosses borders

Digital divide crosses all borders, culturally and geographically, discuss how the digital divide affects society in 2014.

  Find final contents of cache using direct-mapped cache

Suppose direct-mapped cache with 16 one-word blocks that is initially empty, label each reference in list as hit or miss and find final contents of the cache.

  Discuss the advantages and disadvantages of outsourcing it

Discuss the advantages and disadvantages of outsourcing IT.

  Draw the uml diagram and implement

Draw the UML diagram and implement the new GeometricObject class. Write a test program that uses the max method to find the larger of two circles and the larger of two rectangles.

  Can you imagine any multilevel computer not lowest levels

can you imagine any multilevel computer in which the device level and digital logic levels were not the lowest levels? explain

  Write using the summation notation

Write using the summation notation

  Explain chain of custody is critical factor for cases

Think of numerous cases where evidence could potentially be tampered with a cell phone or thumb drive. What can go wrong?

  Convey the meaning of the poem? chat conversation end

Write Poem Analysis essay, Works Cited, and Copy of Poem (with line numbers). Also, copy and paste your entire essay into the body of the thread. Essay: 3 pages in MLA format,use 3-5 in-text (short) citations and 1-2 block (long) quotations. You also..

  Determine the contents of the relocation

A program was initally loaded into memory starting at address 500. Determine the contents of the relocation register after the program is moved to address 200?

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