Reference no: EM13362936
The Big Picture
This assignment consists of two separate programming tasks.
1. You will create a linked list module that exactly meets the specifications given in the supplied header (.h) file.
2. You will create a program to read file consisting of data about a playlist of songs, create a linked list of structs using that data, and then print out some summary information about the list.
Part 1: the Linked List
? Your linked list module will be tested using a test program written by one of the TAs.
? The program will test every operation of your list and will try to find ways to break your linked list by sending null values, wrong values, etc.
? Your linked list code must exactly follow the specifications given in the comments for each function. Those comments can be found in the .h file provided. The provided header file is in the examples repo (A4starterFiles).
Part 2: the Music Playlist
? The playlist program must accept a filename on the command line (argv).
? Each line of the file will contain information for one song. The playlist program must load that information into a struct and then add the struct properly to the linked list.
? Songs will have five pieces of information: artist, title, length in seconds, size of file in kb, and type. Type can only be the letter a or the letter b.
? Songs of type a must be added to the front of the list. Songs of type b must be added to the back of the list. Other than sorting by type, the elements should be in the same order as the input file.
? The music program must print out 3 things (and only 3 things):
1. The total length of the playlist in hh:mm:ss format. There should be no words accompanying this printout, just the time followed by a hard return (linefeed).
2. The average file size in the playlist. The file size should be formatted to two decimal places. The file size should be followed by a hard return and should have no accompanying text.
3. The entire list. Each element of the list should be on its own line. The list must be printed in order. Individual items in the list should be printed according to the specification for printing records that are given in the .h file.
Expectations and Grading Notes
This code will be automatically graded. You will be scored on four different aspects of your submission.
1. Submission and compilation: This will examine whether your submission has all of the required files in the correct locations(including README, references, testing, folders, and makefile). It will also examine contents of these files for headers, and correct organization and will check to make sure you have used your linked list in your music library program and will check that your assignment submission compiles without errors or warnings.
This will be graded using scripts and visual inspection.
2. Coding style: This will examine your use of white space, your commenting habits, your variable names, etc. This section will be evaluated using a (possibly customized) version of cpplint. You will be provided information about how to use cpplint yourself to check your code.
3. Linked list functionality: This will be evaluated using a c program that is compiled with your linked list. The program has been provided to you with the starter files along with a makefile. The makefile will compile the testing program when you typemake test. You can add your own compile line to the makefile for compiling your music library program.
4. Music Library functionality: Your music library will be run with an input file that is written by the TAs and Judi. The output from your library will be compared using diff to output that is known to be correct. Your library must use your linked list or it will receive a grade of zero.
Details about the data file
? A single line of text in the file represents one song. The fields in each row will be comma-delimited. The line will end with a hard return. The fields in the file are enumerated below.
1. the artist: an artist or group name of no more than 25 characters.
2. the title: a song title of no more than 40 characters.
3. the length: an integer number representing the length of the song in seconds.
4. the size: a decimal number representing the size of the song file in kilobytes.
5. the type: a single character, a or b.