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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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