Homework 3, My Playlist

Short Description:

Write a program which will allow a user to manipulate a modified .mu3 formatted playlist.

This assignment is worth 100 points.

Goals

When you finish this homework, you should:

Formal Description

Write a program which will assist a user in managing a playlist.

A Playlist is used by music a player (such as xmms) to allow the user to customize which songs will be played, as well as the order in which these songs will be played. For this program we will work with a modified version of the .m3u playlist format.

The playlist begins with the directive #EXTM3U. In our modified format, this line will also contain the number of tracks in the file.

Each track in the file is formatted as follows:

My music management software (mediamonkey) names files in the following format

Furthermore, files are saved in a directory structure with the following format: Combining these two bits of information, we can extract, from a playlist generated on my system the following information:

Here is an example playlist

Your program should be interactive and allow the user to perform the following actions to manipulate a playlist in the format described above.

Discussion

I would begin by doing an bottom up design. I would write a set of routines to read, write, display, compare, and perform other options on a track.

You may NOT write three different sort routines. Modify the sort routine so that it uses different comparisons depending on an input flag.

Use plenty of space in your output. Make sure you tell the user what you are doing at every step.

To randomize an array:

for(i=0; i < arraySize; i ++)  {
   k = rand() % arraySize;
   swap(array, i, k);
}

Required Files

Source code, Makefile, and ReadMe files required to build the project.

Submission

This program in due October 20 at class time. Email a tar file containing all required files to dbennett@edinboro.edu by that time.