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

Previous Q& A

  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?

  Examine the culture of the selected organization

Examine the culture of the selected organization.

  Calculate earnings per share

Calculate earnings per share, EPS, under each of the three economic scenarios before any debt is issued.

  Explain the ksp of cadmium hydroxide

The Ksp of cadmium hydroxide, Cd(OH)2, is 7.20 × 10-15. Calculate the molar solubility of this compound.

  Compute the diameter of the hole

Light from a He-Ne laser of wavelength 633 nm passes through a circular aperture. It is observed on a screen 4.0 m behind the aperture. compute the diameter of the hole

  Evaluate an experience

From the e-Activity, analyze the importance of production planning and scheduling within an organization. Evaluate a bad experience you have had with an appointment from both perspectives of the customer (you) and the organization due to ineffi..

  Business environment analysis

You know that Michael Porter’s Five Forces Model is a useful tool for analyzing a business, understanding the importance of the five competitive forces and helping to develop a Generic Strategy.


Write a Review


Similar Q& A

  Interpersonal skills

An outstanding leader needs good strategic substance but does not need interpersonal skills.

  What is a two-level drama

What is a two-level drama? What does the two-level drama suggest about how we should read the gospels in our churches today?

  Healthy life year liberia

Healthy life in Liberia since the past two decades have been tremendous conflict of civil war in Liberia and poor governance on Liberia’s capacity for human development has been devastating for Liberian.

  How do peers affect delinquency

How do peers affect delinquency? Do delinquents seek out antisocial and delinquent peers as friends or does having delinquent peers cause an individual to become delinquent?

  Predisposing factors and precipitating stressors

In the book "Just Checking" by Emily Colas, what examples from the book suggested predisposing factors and precipitating stressors that contributed to the development of obsessive compulsive disorder (OCD)?

  Early byzantine period

Describe the contributions of Justinian during the Early Byzantine period.

  Narrative program for currency conversion

Use the C compiler to write a C program that holds your narrative from broken down into one line sentences, that have been commented out.

  Explains what is meant by the sociological perspective

Explains what is meant by the sociological perspective. Describe how it helps us to understand the origins of crime and to identify possible ways of reducing crime.

  Human cloning-genetic engineering with stem cell research

Research on a website on Leon Kass on human cloning and genetic engineering with stem cell research.

  Nursing or nutrition research

I need help in finding a recently to published nursing or nutrition research article on any topic and answer the following questions:

  Relationships between cognition and comprehension

Describe the possible relationships between cognition, comprehension, and language production. Be sure to include specific skills the preschool child uses (e.g. fast mapping) and the learning theories that support the relationships you identify.

  Obvious symptoms of psychosis

Which of the following are obvious symptoms of psychosis?

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