PROJECT: sickMusicPlayer aka lowFunctionalityMusicPlayer DUE: Wed Oct 17th You may work with up to 1 other person, and that is highly encouraged. Write a program in C that implements a music library organizer. The data structure should consist of an array of 27 slots (one for each letter from 'a' to 'z', and another for other symbols). Each slot will contain a linked list of all the artists that have names that start with the corresponding letter. When you add a song, it should go on to a linked list at the appropriate array slot in the correct position alphabetically. Assume no duplicate songs. Your nodes/links should be able to hold a song's title and artist. You might use structures like the following: struct song_node{ char name[100]; char artist[100]; struct song_node *next; }; //and later: struct song_node * table[27]; You should start by making your linked lists work with the following functionality:
Then create your array of linked lists for the full program to have the following functions:
Files you should have:
Git repo: MKS65C-Tunes -One repo per group should have code. -All repos should have the name of their partners as a text file. e.g. Kim.Leeroy Smith.Jinkyu You must test all the functions in your main function in order to receive full credit!!! Example of reasonable testing output:
==================================== Testing print_library a list ac/dc: thunderstruck | p list pearl
jam: alive | pearl jam: even flow | pearl jam: yellow ledbetter | pink
floyd: time | presidents of the united states of america: peaches | r list radiohead: paranoid android | radiohead: street spirit (fade out) | ==================================== Testing print_letter p list pearl
jam: alive | pearl jam: even flow | pearl jam: yellow ledbetter | pink
floyd: time | presidents of the united states of america: peaches | ==================================== Testing find: looking for [pearl jam: alive] song found! pearl jam: alive looking for [pearl jam: time] song not found ==================================== Testing find artist: looking for [pearl jam] artist
found! pearl jam: alive | pearl jam: even flow | pearl jam: yellow
ledbetter | pink floyd: time | presidents of the united states of
america: peaches | looking for [pink floyd] artist found! pink floyd: time | presidents of the united states of america: peaches | looking for [bob dylan] artist not found ==================================== Testing remove_song removing: [pearl jam: alive] a list ac/dc: thunderstruck | p list pearl jam: even flow | pearl jam: yellow ledbetter | pink floyd: time | presidents of the united states of america: peaches | r list radiohead: paranoid android | radiohead: street spirit (fade out) | removing: [pearl jam: yellow ledbetter] a list ac/dc: thunderstruck | p list pearl jam: even flow | pink floyd: time | presidents of the united states of america: peaches | r list radiohead: paranoid android | radiohead: street spirit (fade out) | ==================================== Testing clear_library: freeing node: ac/dc - thunderstruck freeing node: pearl jam - even flow freeing node: pink floyd - time freeing node: presidents of the united states of america - peaches freeing node: radiohead - paranoid android freeing node: radiohead - street spirit (fade out) Library after clear: ==================================== Adding songs to empty library a list ac/dc: thunderstruck | p list pearl jam: alive | pearl jam: even flow | pearl jam: yellow ledbetter | pink floyd: time | ==================================== Testing print_artist: Printing [pearl jam] [pearl jam: alive] [pearl jam: even flow] [pearl jam: yellow ledbetter] Printing [ac/dc] [ac/dc: thunderstruck] ==================================== Testing shuffle ac/dc: thunderstruck ac/dc: thunderstruck pearl jam: yellow ledbetter ==================================== |