subject
Business, 17.04.2020 18:48 levicorey846

Starting Out with C++ 8th Edition Gaddis p1060-1061 #1-7

1. Your Own Linked List Design your own linked list class to hold a series of integers. The class should have member functions for appending, inserting, and deleting nodes. Don’t forget to add a destructor that destroys the list. Demonstrate the class with a driver program.

2. List Print Modify the linked list class you created in Programming Challenge 1 to add a print member function. The function should display all the values in the linked list. Test the class by starting with an empty list, adding some elements, and then printing the resulting list out.

3. List Copy Constructor Modify your linked list class of Programming Challenges 1 and 2 to add a copy constructor. Test your class by making a list, making a copy of the list, and then displaying the values in the copy.
1060 Chapter 17 Linked Lists
4. List Reverse Modify the linked list class you created in the previous programming challenges by adding a member function named reverse that rearranges the nodes in the list so that their order is reversed. Demonstrate the function in a simple driver program.

5. List Search Modify the linked list class you created in the previous programming challenges to include a member function named search that returns the position of a specific value in the linked list. The first node in the list is at position 0, the second node is at position 1, and so on. If x is not found on the list, the search should return 1. Test the new member function using an appropriate driver program.

6. Member Insertion by Position Modify the list class you created in the previous programming challenges by adding a member function for inserting a new item at a specified position. A position of 0 means that the value will become the first item on the list, a position of 1 means that the value will become the second item on the list, and so on. A position equal to or greater than the length of the list means that the value is placed at the end of the list.

7. Member Removal by Position Modify the list class you created in the previous programming challenges by adding a member function for deleting a node at a specified position. A value of 0 for the position means that the first node in the list (the current head) is deleted. The function does nothing if the specified position is greater than or equal to the length of the list.

Write code for a single program in C++ that accomplishes the tasks of the above questions:

Create a linked list

Print the list

Copy the list

Reverse the list

Search the list (linear search)

Insert into the list

Remove from the list

Include a driver (the main() function) that displays all of the functionality.

ansver
Answers: 1

Another question on Business

question
Business, 22.06.2019 02:30
Based on the supply and demand theory, why do medical doctors earn higher wages than child-care workers?
Answers: 1
question
Business, 22.06.2019 09:00
Consider the scenario below and let us know if you believe lauren smith's actions to be ethical. let us know why or why not. lauren smith is the controller for sports central, a chain of sporting goods stores. she has been asked to recommend a site for a new store. lauren has an uncle who owns a shopping plaza in the area of town where the new store is to be located, so she decides to contact her uncle about leasing space in his plaza. lauren also contacted several other shopping plazas and malls, but her uncle’s store turned out to be the most economical place to lease. therefore, lauren recommended locating the new store in her uncle’s shopping plaza. in making her recommendation to management, she did not disclose that her uncle owns the shopping plaza. if management decided to go with lauren's uncle's plaza, what additional information would be needed in the financial statements?
Answers: 2
question
Business, 22.06.2019 20:00
Ryngard corp's sales last year were $38,000, and its total assets were $16,000. what was its total assets turnover ratio (tato)? a. 2.04b. 2.14c. 2.26d. 2.38e. 2.49
Answers: 1
question
Business, 22.06.2019 21:10
You are the manager of a large crude-oil refinery. as part of the refining process, a certain heat exchanger (operated at high temperatures and with abrasive material flowing through it) must be replaced every year. the replacement and downtime cost in the first year is $165 comma 000. this cost is expected to increase due to inflation at a rate of 7% per year for six years (i.e. until the eoy 7), at which time this particular heat exchanger will no longer be needed. if the company's cost of capital is 15% per year, how much could you afford to spend for a higher quality heat exchanger so that these annual replacement and downtime costs could be eliminated?
Answers: 1
You know the right answer?
Starting Out with C++ 8th Edition Gaddis p1060-1061 #1-7

1. Your Own Linked List Design...
Questions
question
Mathematics, 12.07.2019 22:30
Questions on the website: 13722362