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

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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