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

  Substantive and procedural requirements for search-arrest

Compare and contrast the U.S. and England's Overview of substantive and procedural requirements for search, arrest and conviction.

  Defining and redefining key terms

Discuss what do you think of Socrates' conclusion that no person knowingly does evil, and therefore, all evil is ignorance? Do you agree or disagree, and explain your answer?

  Developmental theories fundamentals

After deciding upon the three developmental theories you will compare and contrast, locate research that has been conducted on those developmental theories. You will find research and empirical articles located in the online library.

  Healthy self identity development of self and personality

"Healthy Self Identity (Psychology) development of self and personality; during this stage of development, the adolescent is asking "Who am I?, the adolescent's ability to develop a healthy self identity is essential for navigating through life, not ..

  Supported the conventional philosophy of the israelites

Supported the conventional philosophy of the Israelites and most cultures in the wider ANE that gods reward their righteous human servants with health, wealth, and long life.

  Food-borne illnesses may cause serious health problems

Food-borne illnesses may cause serious health problems. How are food-borne illnesses contracted? What are some ways you can protect yourself and others from food-borne illnesses at home?

  What is explicitly geographical about the application

What is explicitly geographical about the application (i.e. why is geography/location relevant to the application)? What data sets would be required? What form of GIS data representation would be most suitable (vector or raster)?

  Describe ethical issues involved in using emotional appeal

Describe the ethical issues involved in using emotional appeal and when is emotional appeal iappropriate and when it is not.

  Overview of the organization offering the product

Selection of an existing product, service, or marketing campaign and overview of the organization offering the product, service, or marketing campaign

  Antibacterial drugs disrupt or destroy prokaryotic structure

Most antibacterial drugs disrupt or destroy prokaryotic structure/processes that are different from those of eukaryotic cells. Names 3 prokaryotic cellular structure that fit this profile, describe them and explain why the 3 you chose would represent..

  Explain techinques to persuade the audience

Assume you are the newspaper columist asked to explain the issue of global warmaing and energy in next editorial blog of your newspaper.

  Movement toward secession in the winter of 1860-1861

The movement toward secession in the winter of 1860-1861 was most rapid in...

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