Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement the PrintList() function appropriately to print out the names stored in the list. You do NOT need to add the void SortedList::PrintList() const or

Implement the PrintList() function appropriately to print out the names stored in the list. You do NOT need to add the void SortedList::PrintList() const or the brackets, just the code that is within the function.

OUTPUT EACH NAME ON A SEPARATE LINE WITH std::endl SEPARATING EACH OUTPUT.

image text in transcribed

3 8 1 #include 2 #include 3 4 v struct Node 5 { 6 std::string name; 7 Node * nextNode; }; 9 10 11 v class SortedList 12 { 13 private: 14 Node *_beginningNode; 15 Node *_endingNode; 16 17 public: 18 SortedList(); 19 SortedList(); 20 21 void AddItem(const std::string & name); 22 void RemoveItem(const std::string & name); 23 void PrintList() const; 25 }; #include "sortedlist.hpp" 124 1 2 5 6 Sortedlist::SortedList() { 1/ implement the destructor to delete all // items from this list when the list leaves scope 1/ syntax MUST be correct to get full credit. } 8 9 10 11 12 13 14 15 16 17 18 19 20 void Sortedlist::PrintList() const { // implement the print List function to output the // names of every item in this list. 1/ syntax MUST be correct to get full credit. }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

Prepare a short profile of Lucy Clifford ?

Answered: 1 week ago

Question

Prepare a short profile of Rosa parks?

Answered: 1 week ago

Question

Prepare a short profile of victor marie hugo ?

Answered: 1 week ago

Question

8. Providing support during instruction.

Answered: 1 week ago