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

  What type of employees will you hire to work at help desk

You have been asked to create a help desk for the computer support division of your company

  The company has two economics consultants

The company has two economics consultants. One of them, Juan, says that the company will not sell any of these warranties (at least in the long run), because people will figure out their strategy. The other economist, Fatima, says that the company sh..

  Showing how to use the html element

Describe the attributes that you think would be useful with the HTML element. Provide an example code snippet showing how to use the HTML element. !DocType Html

  How many pages are needed to store the entire job

How many pages are needed to store the entire job?

  Sample the dribbling to extract its frequency

Consider a basketball being dribbled. If the height of the basketball can be described by a sine wave of maximum height 2h, average height h and minimum height 0, and the ball hits the ground once per second, how fast would a video camera have to sam..

  Write a program that generates a sequence of 20 random value

write a program that generates a sequence of 20 random values between 0 and 99, prints the sequence, sorts it, and prints the sorted sequence. use the sort function form the standard C++ library.

  Use active directory for authentication and authorization

Why would an organization choose to use Active Directory for authentication and authorization over other solutions such as Novell Netware or a free solution such as Linux based LDAP.

  Determine degree of statical indeterminacy

Is it statically determinate? If it is not statically determinate, determine its degree of statical indeterminacy? b) Determine the member forces roughly by assuming that diagonal members can't carry compressive loads.

  Technical architecture document

Hardware platform: Describe the hardware environment to support the development and production of this system. Network connections between the stores and headquarters: A network diagram is required.

  What is the project scope and what is scope creep

What is the project scope? What is scope creep? Why does it pose such a risk to the project and project manager?

  Describe the main difference of worm vs. virus

1. Describe the main difference of worm vs. virus and what are the best countermeasures for each in detail.2. What is a DNS attack? Are there different types, if so, explain each? Is the DNS attack assumed to compromise IPSec, and/or is it considered..

  What interface does an application need to use

What interface does an application need to use if it wants to get updates on the current position of the mouse cursor? How does the program get the x,y coordinates of the mouse cursor?

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