[Solved] One Solve 2120 Ch 8 Program Playlist Zybooks Theres Another Post However Doesn T Work Home Q37212868
How does one solve 21.20 Ch 8 Program: Playlist in Zybookstheres another post however it doesn’t work
home / study / engineering / computer science / computer sciencequestions and answers / 21.20 ch 8 program: playlist (c)(programmeon c) you will be building a linked list. make sure …
Question: 21.20 Ch 8 Program: Playlist (C)(programme onC) You will be building a linked list. Make sure to…
21.20 Ch 8 Program: Playlist (C)(programme on C)
You will be building a linked list. Make sure to keep trackof both the head and tail nodes. You will be required tosubmit your algorithm for this assignment to the dropbox inD2L.
(1) Create three files to submit.
- PlaylistNode.h – Struct definition and related functiondeclarations
- PlaylistNode.c – Related function definitions
- main.c – main() function
Build the PlaylistNode class per the following specifications.Note: Some functions can initially be function stubs (emptyfunctions), to be completed in later steps.
- Private data members
- char uniqueID[50]
- char songName[50]
- char artistName[50]
- int songLength
- PlaylistNode* nextNodePtr
- Related functions
- CreatePlaylistNode()
- InsertPlaylistNodeAfter()
- Insert a new node after node
- SetNextPlaylistNode()
- Set a new node to come after node
- GetNextPlaylistNode()
- Return location pointed by nextNodePtr
- PrintPlaylistNode()
Ex. of PrintPlaylistNode output:
Unique ID: S123Song Name: PegArtist Name: Steely DanSong Length (in seconds): 237
(2) In main(), prompt the user for the title of theplaylist.
Ex:
Enter playlist’s title:JAMZ
(3) Implement the PrintMenu() function. PrintMenu() takes theplaylist title as a parameter and outputs a menu of options tomanipulate the playlist. Each option is represented by a singlecharacter. Build and output the menu within the function.
If an invalid character is entered, continue to prompt for avalid choice. Hint: Implement Quit before implementing otheroptions. Call PrintMenu() in the main() function. Continue toexecute the menu until the user enters q to Quit.
Ex:
JAMZ PLAYLIST MENUa – Add songr – Remove songc – Change position of songs – Output songs by specific artistt – Output total time of playlist (in seconds)o – Output full playlistq – QuitChoose an option:
(4) Implement “Output full playlist” menu option. If the list isempty, output: Playlist is empty
Ex:
JAMZ – OUTPUT FULL PLAYLIST1.Unique ID: SD123Song Name: PegArtist Name: Steely DanSong Length (in seconds): 2372.Unique ID: JJ234Song Name: All For YouArtist Name: Janet JacksonSong Length (in seconds): 3913.Unique ID: J345Song Name: Canned HeatArtist Name: JamiroquaiSong Length (in seconds): 3304.Unique ID: JJ456Song Name: Black EagleArtist Name: Janet JacksonSong Length (in seconds): 1975. Unique ID: SD567Song Name: I Got The NewsArtist Name: Steely DanSong Length (in seconds): 306
(5) Implement the “Add song” menu item. New additions are added tothe end of the list.
Ex:
ADD SONGEnter song’s unique ID:SD123Enter song’s name:PegEnter artist’s name:Steely DanEnter song’s length (in seconds):237
(6) Implement the “Remove song” function. Prompt the user for theunique ID of the song to be removed.
Ex:
REMOVE SONGEnter song’s unique ID:JJ234″All For You” removed
(7) Implement the “Change position of song” menu option. Prompt theuser for the current position of the song and the desired newposition. Valid new positions are 1 – n (the number ofnodes). If the user enters a new position that is less than 1, movethe node to the position 1 (the head). If the user enters a newposition greater than n, move the node to positionn (the tail). 6 cases will be tested:
- Moving the head node
- Moving the tail node
- Moving a node to the head
- Moving a node to the tail
- Moving a node up the list
- Moving a node down the list
Ex:
CHANGE POSITION OF SONGEnter song’s current position:3Enter new position for song:2″Canned Heat” moved to position 2
(8) Implement the “Output songs by specific artist” menu option.Prompt the user for the artist’s name, and output the node’sinformation, starting with the node’s current position.
Ex:
OUTPUT SONGS BY SPECIFIC ARTISTEnter artist’s name:Janet Jackson2.Unique ID: JJ234Song Name: All For YouArtist Name: Janet JacksonSong Length (in seconds): 3914.Unique ID: JJ456Song Name: Black EagleArtist Name: Janet JacksonSong Length (in seconds): 197
(9) Implement the “Output total time of playlist” menu option.Output the sum of the time of the playlist’s songs (inseconds).
Ex:
OUTPUT TOTAL TIME OF PLAYLIST (IN SECONDS)Total time: 1461 seconds
Note..It needs to be IN C not C++ I’m only repostingcause it’s sort of urgent due soon hoping this gets seen theresalso another one on Chegg two technically one in C but that onedoes not work in gives about 15 errors
Expert Answer
Answer to How does one solve 21.20 Ch 8 Program: Playlist in Zybooks theres another post however it doesn’t work home / study / en… . . .
OR

