Playlist Time Calculator

A popular pasttime among music collectors is creating "mix" tapes or cd's that contain a variety of songs taken from different albums.  One frequent task is to determine if the total time of the songs selected for recording is less than the time available on the recording media (CD or audio tape).  You are to write a computer program to assist with that task.

Requirements

The user will create a songlist using a text editor named songdata.txt.  The songlist contains a list of all candidate songs (up to 99 songs in length). Each line of the songlist contains the title of the song, the length of the song in seconds, the artist, and the year the song was released. For example:
songdata.txt

Hey_Jude 181 The_Beatles 1968
Stairway_to_Heaven 180 Led_Zeppelin 1971
Radar_Love 239 Golden_Earring 1974
Riders_On_The_Storm 543 The_Doors 1971
What's_So_Funny?_('bout_Peace,_Love,_and_Understanding) 221 Elvis_Costello 1979
No_Need_To_Argue 347 The_Cranberries 1994
Don't_Get_Fooled_Again 497 The_Who 1971
Thick_As_A_Brick 1265 Jethro_Tull 1972
Close_To_The_Edge 1130 Yes 1972
This_one_song_has_28_letters 001 Nobody 1900

Note that no blanks are allowed in the song or artist names; use underlines to separate words.  When the program begins it reads the songlist and displays the songs so they can be selected by the user.  (If the file can't be opened, display this error message: "Unable to open songdata.txt - missing file?") The song length is converted and displayed as minutes and seconds.

[ 1]  3:01 Hey_Jude
[ 2]  3:00 Stairway_to_Heaven
[ 3]  3:59 Radar_Love
[ 4]  9:03 Riders_On_The_Storm
[ 5]  3:41 What's_So_Funny?_('bout_Peac
[ 6]  5:47 No_Need_To_Argue
[ 7]  8:17 Don't_Get_Fooled_Again
[ 8] 21:05 Thick_As_A_Brick
[ 9] 18:50 Close_To_The_Edge
[10]  0:01 This_one_song_has_28_letters
                                        Total:  0:00   Remaining: 50:00
Song number?

The user selects a song by entering the reference number displayed next to the song.  Songs that have been selected by the user appear in the right hand column.

[ 1]  3:01 Hey_Jude
[ 2]  3:00 Stairway_to_Heaven
[ 3]  3:59 Radar_Love
                                        [ 4]  9:03 Riders_On_The_Storm
[ 5]  3:41 What's_So_Funny?_('bout_Peac
[ 6]  5:47 No_Need_To_Argue
                                        [ 7]  8:17 Don't_Get_Fooled_Again
[ 8] 21:05 Thick_As_A_Brick
[ 9] 18:50 Close_To_The_Edge
[10]  0:01 This_one_song_has_28_letters
                                        Total: 17:20   Remaining: 32:40
Song number?


After each user entry, the table is redisplayed with the song moved to the other column. Songs can be moved from the left column to the right or from the right column to the left. The program should then calculate and display the total time of songs in the right column, as well as the recording time remaining.

When the user attempts to move a song from left to right, make sure there is enough remaining time for the song to fit.  If there isn't don't move the song and display a message saying there is not enough remaining time for that song.

     **** Not enough remaining time for song #1 ****

[ 1]  3:01 Hey_Jude
[ 2]  3:00 Stairway_to_Heaven
[ 3]  3:59 Radar_Love
                                        [ 4]  9:03 Riders_On_The_Storm
[ 5]  3:41 What's_So_Funny?_('bout_Peac
[ 6]  5:47 No_Need_To_Argue
[ 7]  8:17 Don't_Get_Fooled_Again
                                        [ 8] 21:05 Thick_As_A_Brick
                                        [ 9] 18:50 Close_To_The_Edge
[10]  0:01 This_one_song_has_28_letters
                                        Total: 48:58   Remaining:  1:02
                                        Total: 48:58   Remaining:  1:02
Song number? 0
3 records written to playlist.txt.

Exit the program by entering a song number of 0.

When the user exits the program, all the songs currently shown in the playlist are written to a data file, playlist.txt, which has the format as shown in this example:
 543 1971 Riders_On_The_Storm            The_Doors                     
1265 1972 Thick_As_A_Brick               Jethro_Tull                   
1130 1972 Close_To_The_Edge              Yes    
The number of songs written to the data file is displayed (using the format shown in the example above).


You may assume
Constraints: