Question: C programming C programming C programming C programming (The artistes+song.txt file can be any artist and song of your choice eg.) Ed Sheeran Shape of

C programming C programming C programming C programming

C programming C programming C programming C programming (The artistes+song.txt file can

(The artistes+song.txt file can be any artist and song of your choice eg.)

Ed Sheeran

Shape of you**3:53

Afterglow**3:05

Eminem

Till I Collapse***4:57

Maroon 5

Moves like jagger***3:21

Detailed Specification Input The program takes its input from a file specified as an argument to the program. If the file does not exists or is not readable, the program prints out an error message to this effect. If no file is specifed, the program searches in the current directory for a file called artistes+songs.txt. If no such file exists, the program prints a message "No file found." and then prompts the user to enter the artistes and songs information from the keyboard according to the specified format. The format of the file is as follows: Artiste name Song title***Song duration Song title***Song duration Song title***Song duration Artiste name Song title***Song duration Song title***Song duration Song title***Song duration Each song title comprises alphanumeric characters (letters, numbers and symbols) but does not contain the sub-string *** "Song duration" is in the form [m]m:ss, where [m]m denotes a one or two-digit number of minutes and ss denotes a two-digit number of seconds. For testing purposes, at least two artistes should have three or more songs each. Sort artistes and songs Your program should then sort the input by artiste name and then by song title and print it out in the following format: Sorted list of artistes and songs Artiste name o Song title***Song duration o Song title***Song duration o Song title***Song duration Artiste name o Song title***Song duration o Song title***Song duration o Song title***Song duration Detailed Specification Input The program takes its input from a file specified as an argument to the program. If the file does not exists or is not readable, the program prints out an error message to this effect. If no file is specifed, the program searches in the current directory for a file called artistes+songs.txt. If no such file exists, the program prints a message "No file found." and then prompts the user to enter the artistes and songs information from the keyboard according to the specified format. The format of the file is as follows: Artiste name Song title***Song duration Song title***Song duration Song title***Song duration Artiste name Song title***Song duration Song title***Song duration Song title***Song duration Each song title comprises alphanumeric characters (letters, numbers and symbols) but does not contain the sub-string *** "Song duration" is in the form [m]m:ss, where [m]m denotes a one or two-digit number of minutes and ss denotes a two-digit number of seconds. For testing purposes, at least two artistes should have three or more songs each. Sort artistes and songs Your program should then sort the input by artiste name and then by song title and print it out in the following format: Sorted list of artistes and songs Artiste name o Song title***Song duration o Song title***Song duration o Song title***Song duration Artiste name o Song title***Song duration o Song title***Song duration o Song title***Song duration

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!