Operation to the class linkedlisttype

Assignment Help Other Subject
Reference no: EM13260213

Write a program that will add the following operation to the class LinkedListType that is provided to you on blackboard. The program must provide two additional functions that do the following:

search: Searches a list for a specified value. If the value is found, it should return a number indicating its position in the list. The first node is node 1, the second node is node 2, and so forth.) If the value is not found, the function should return 0.

divideAt: Divide a list at the node with a specific value. This means two list will result at the divide.

This program requires that you add the search and divideAt functions to the class provided on blackboard that performs the indicated tasks described. You must also demonstrate the function in a driver program. The program should print out the location of a search node and the separated list after division of the list. A sample driver program is provided that builds the list and does a simple search. A re-write of the driver is required to test all possible occurrences.

The program should produce output as given below.

Suppose myList points to the list with the elements 25, 35, 45, 55, 65, 75, 85, 45 (in this order). The statement myList.search (45);

will return 3 for the position. and the statement

myList.divdeAt (otherlist, 45);

will divide myList into two sublists where myList points to the list with 25, 35 and otherList points to the sublist with elements 45, 55, 65, 75, 85

myList.searchAll (45); will return 3 8 for the positions.

Program Specifications

The program you develop must have the following characteristics:

It must modify the class definition provided with this assignment

It must declare any additional necessary variables required in the program

It must test for all possible occurrences of data (if it is in the list, if it is not in the list, if it appears multiple times).

It must be commented adequately

o Label the class members provided with the assignment and added by you o Label each function call

o Before each function, give a brief description of what the function will do

Reference no: EM13260213

Questions Cloud

What is the break-even ebit : What is the break-even EBIT? (Do not round intermediate calculations. Enter your answer in dollars, not millions of dollars, i.e. 1,234,567.)
Legal issues : Legal Issues
Stories between gloucester family and lear family similar : How were the stories between the Gloucester family and Lear family similar? How did the weather parallel the story of King Lear? What is the significance of the role of the fool in the story?
Major and minor league baseball teams. : All-Star Bat Manufacturing, Inc., supplies baseball bats to major and minor league baseball teams.
Operation to the class linkedlisttype : Write a program that will add the following operation to the class LinkedListType that is provided to you on blackboar. Searches a list for a specified value. If the value is found, it should return a number indicating its position in the list. The f..
Evaluating technology : Evaluating Technology
Calculate the moment of inertia of the disk : What is the moment of inertia of the disk for rotation about an axis through the edge of the disk
What is the distance between the two colors on the screen : A ray of light consisting of two colors (red and blue) is incident normally on the face of a small equilateral prism. What is the distance between the two colors on the screen
Explain what hypoparathyroidism : Explain what hypoparathyroidism is and the clinical manifestations (symptoms) of hypoparathyroidism. How is hypoparathyroidism diagnosed and treated?

Reviews

Write a Review

Other Subject Questions & Answers

  Maintaining the confidentiality, integrity

Create a list of at least 10 confidentiality, integrity, and availability requirements that must be met for this transaction to be secure (such as secrecy of the PIN, or possession of the card) be sure to list the level of importance of each requi..

  Tools of public health law

Give a scenario in which one of the tools of public health law might be used in an ethical way, and another scenario in which it might be considered unethical. For each, explain why this use is or isn't ethical.

  Rich are taxed more heavily than poor and that amendment

The fact that the rich are taxed more heavily than the poor and that amendments that gave voting rights to minorities were passed by large majorities suggests that ?

  Organization recruiting challenges and solutions

What kinds of recruiting challenges do organizations face?

  Example of american stereotype

What appears to be the attitude of the writer toward "Negro women" in the first paragraph? How does this attitude change in the second paragraph? Why do you think the attitude of the author changes?

  Spoke semitic language-which is related to arabic-hebrew

The people of __________ spoke a Semitic language, which is related to Arabic and Hebrew.

  Psychological assessments ethically

What must you be aware of to ensure that you are using psychological assessments ethically with your clients? How can you raise awareness in your own organization about the ethical use of tests?

  Foraging and horticultural societies

Identify and explain the major forms of reciprocity found in both Foraging and Horticultural societies and provide examples regarding how they impact the level of conflict found in these societies?

  Discrimination title vii of civil rights act of 1964

Jennings, an African American man, works as a legal secretary for Harper and Williams, Attorneys.If he is later terminated due to less than satisfactory performance, will Harper and Williams have any cause for concern regarding a race discriminati..

  Decade of corporate greed

The Electronic Reserve Readings for this week, located in aXcess, which provides additional information about Reganomics and the decade of corporate greed. These readings demonstrate different viewpoints, so read carefully to understand the arguments..

  During the process of psychotherapy

"During the process of psychotherapy, Elaine recovered some long-forgotten and painful memories from her childhood. This experience led her to conclude that these memories must have been repressed for many years.

  Community counseling

What do you think about using a pathology based manual in a wellness based profession(community counseling)?

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