8.18 LAB: Playlist (output linked list) Given main(), complete the songNode class to include the function PrintSonginfo(

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

8.18 LAB: Playlist (output linked list) Given main(), complete the songNode class to include the function PrintSonginfo(

Post by answerhappygod »

8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 1
8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 1 (31.65 KiB) Viewed 67 times
8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 2
8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 2 (55.53 KiB) Viewed 67 times
8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 3
8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 3 (48.55 KiB) Viewed 67 times
8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 4
8 18 Lab Playlist Output Linked List Given Main Complete The Songnode Class To Include The Function Printsonginfo 4 (56.79 KiB) Viewed 67 times
8.18 LAB: Playlist (output linked list) Given main(), complete the songNode class to include the function PrintSonginfo(). 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.
Output is nearly correct, but whitespace differs. See highlights below. Input Your output Stomp! 380 The Brothers Johnson The Dude 337 Quincy Jones You Don't Own Me 151 Lesley Gore -1 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 LIST OF SONGS Title: Stomp! Length: 380 Artist: The Brothers Johnson Special charact
Title: Digital Love Length: 298 Artist: Daft Punk 3: Unit test Title: Nice For What Length: 204 Artist: Drake L LIST OF SONGS 1 Title: Dirty Computer Length: 119 Artist: Janelle Monáe Title: Frontin' Length: 241 Artist: Pharrell Williams Expected output Title: Mr. Brightside Length: 223 Artist: The Killers Title: Digital Love Length: 298 Artist: Daft Punk Title: Nice For What Length: 204 Artist: Drake
24 } 25 26 // Get location pointed by nextNodeRef 27 SongNode* SongNode::GetNext() { 28 return this->nextNodeRef; 29 } 30 31 void SongNode::PrintSongInfo(){ 32 33 //print the details 34 35 cout<<("Title: " + this->songTitle)<<endl; 36 cout<<("Length: cout<<("Artist: 37 38 67800 } " + this->songLength)<<endl; " + this->songArtist) <<endl;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply