Question: Language is C++ Given main(), complete the SongNode class to include the function PrintSonglnfo(). Then write the PrintPlaylist() function in main.cpp to print all songs

Language is C++ Language is C++ Given main(), complete the SongNode class to include thefunction PrintSonglnfo(). Then write the PrintPlaylist() function in main.cpp to print allsongs in the playlist. DO NOT print the dummy head node. Ex:If the input is: Stomp! 380 The Brothers Johnson The Dude 337Quincy Jones You Don't Own Me 151 Lesley Gore -1 the outputis: LIST OF SONGS Title: Stomp! Length: 380 Artist: The Brothers JohnsonTitle: The Dude Length: 337 Artist: Quincy Jones Title: You Don't OwnMe Length: 151 Artist: Lesley Gore \#include iostream> \#include "SongNode.h" // TODO:

Given main(), complete the SongNode class to include the function PrintSonglnfo(). Then write the PrintPlaylist() function in main.cpp to print all songs in the playlist. DO NOT print the dummy head node. Ex: If the input is: Stomp! 380 The Brothers Johnson The Dude 337 Quincy Jones You Don't Own Me 151 Lesley Gore -1 the output is: LIST OF SONGS Title: Stomp! Length: 380 Artist: The Brothers Johnson Title: The Dude Length: 337 Artist: Quincy Jones Title: You Don't Own Me Length: 151 Artist: Lesley Gore \#include iostream> \#include "SongNode.h" // TODO: Write PrintPlaylist() function int main() \{ SongNode* headNode; SongNode* currNode; SongNode* lastNode; string songTitle; string songLength; string songArtist; // Front of nodes list headNode = new SongNode(); lastNode = headNode; // Read user input until -1 entered getline(cin, songTitle); while (songTitle != "-1") \{ getline(cin, songLength); getline(cin, songArtist); currNode = new SongNode(songTitle, songLength, songArtist); Current file: SongNode.h Load default template... 26272829303132333435I/insertAftervoidInsertAfter(SongNode*nodeLoc);IIGetlocationpointedbynextNodeRefSongNode*GetNext();IIPrintssonginformationvoidPrintsongInfo();}; Current file: SongNode.cpp Load default template... II Get location pointed by nextNodeRef SongNode* SongNode: :GetNext () \{ return this->nextNodeRef; \} I/ TODO: Write PrintsongInfo() function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!