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, 21.06.2019 23:30
On september 12, ryan company sold merchandise in the amount of $5,800 to johnson company, with credit terms of 2/10, n/30. the cost of the items sold is $4,000. ryan uses the periodic inventory system and the net method of accounting for sales. on september 14, johnson returns some of the non-defective merchandise, which is restored to inventory. the selling price of the returned merchandise is $500 and the cost of the merchandise returned is $350. the entry or entries that ryan must make on september 14 is (are): multiple choice sales returns and allowances 490 accounts receivable 490 merchandise inventory 350 cost of goods sold 350 sales returns and allowances 490 accounts receivable 490 sales returns and allowances 500 accounts receivable 500 sales returns and allowances 490 accounts receivable 490 merchandise inventory 343 cost of goods sold 343 sales returns and allowances 350 accounts receivable 350
Answers: 1
question
Business, 22.06.2019 03:30
Joe finally found a house for sale that he liked. which factor could increase the price of the house he likes? a. both he and the seller each have a real estate agent. b. a home inspector finds faulty wiring in the house. c. the house has been for sale for almost a year. d. several buyers all want that same house.
Answers: 2
question
Business, 22.06.2019 05:00
What is free trade? a. trade that is not subject to taxes or fees b. trade that governments do not interfere with c. trade with a high level of government regulation d. trade between states in the u.s. b
Answers: 1
question
Business, 22.06.2019 12:20
Consider 8.5 percent swiss franc/u.s. dollar dual-currency bonds that pay $666.67 at maturity per sf1,000 of par value. it sells at par. what is the implicit sf/$ exchange rate at maturity? will the investor be better or worse off at maturity if the actual sf/$ exchange rate is sf1.35/$1.00
Answers: 2
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, 01.10.2021 08:30
question
Social Studies, 01.10.2021 08:30
question
Social Studies, 01.10.2021 08:30
question
Mathematics, 01.10.2021 08:30
question
Mathematics, 01.10.2021 08:30
Questions on the website: 13722367