Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thanks, I need answer quick. Thank you :) Music player application // All about I this problem please help deadline so close //I update output

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Thanks, I need answer quick. Thank you :)

Music player application // All about I this problem please help deadline so close //I update output input and more details Use standard C Data structures Linked list Input and output given below AddMusic-- Move_MusicDeleteMusic-- Play_Music --- Print_Music_Playlist-- Reverse_Music_Playlist

Deadline 24.01.2021 19.00 In a music player application, it is desired to create a playlist that will allow favorite songs to be played back-to-back. There are playlist editing operations such as adding a new song, removing the song from the list, moving a song in the music list to the front or back of another song. In addition, they can play the songs in the playlist in order and listen to the songs they want whenever they want.

MISION Only c libraries will be used. No 3rd party code or library. The program to be developed must read a text-based input file, named "input.txt", each line corresponding to the commands that need to be executed. It should read the commands in the "input.txt" file and print the output to an output file named "output.txt". After printing the output found commands to the file, it should print "*****" in a new line to the output file.

There is no input limit in input.txt. File operations After the last command in the input.txt file, it should be assumed that there will be one blank line as a new line. File operations should be done accordingly.

There is no limit to the number of times to be added to the playlist. A structure should be chosen according to this situation. Very high and low values must be available.

Each line in the input file will have a command. Command parameters will be separated by the "tab" key. Commands AddMusic: The song adds a new song to the top or bottom of the playlist. Command format: AddMusic

command specifies where the song will be added. The letter "E" indicates the song will be added at the end, and the letter "B" indicates the song will be added to the top. specifies the place name of the song to be added, and it is quarenteed to be a string of up to 50 charecters. This command has no output. Nothing should be printed on the screen or in the output file.

The name of the song should have a maximum of 50 characters. EXAMPLE: AddMusic B Music_E AddMusic E Music_B

Move_Music: Moves a song in the playlist before or after another song in the playlist. Working Format: Move_Music

: The letter "S" indicates the song will be placed before the specified song, and the letter "R" indicates the song will be placed after the specified song.

: is the name of the song to be moved. The song name to be placed before or after the song to be moved. EXAMPLE: Move_Music S Music_E Music_A Move_Music R Music_B Music_E DeleteMusic: Removes the song in the playlist from the playlist. Working format: DeleteMusic

is the name of the song to be deleted. It is guaranteed that the song nae to be delerted will be a valid song name in the playlist

Sample: DeleteMusic Music_A This command has no output, so nothing should be printed on the screen or in the output file.

The song you want to delete with the song delete command can be a song that is currently playing. In this case, no changes should be made to the playlist, the currently playing song should not be deleted and / or changed. However, an information message in the following format should be printed as a new line in the output file to indicate this situation:

Cannot Remove The Playing Song Play_Music: Plays the previous or next song in the playlist. Working Format Play_Music

determines the direction of the song to be played. When the play command is given for the first time, the next song starts playing from the beginning of the playlist. The playing direction parameter given in the command determines the next song. If the playback direction is the next ("O") on the first play command, the song at the top of the playlist starts playing, and if the playback direction is the previous ("F"), the song at the end of the playlist starts to play.

Similarly, if the command to play the previous song (Play_Music F) comes while playing the top song in the playlist, the last song in the list is played, while the song at the end of the playlist is played, and the next song is played (Play_Music O), but the song at the top of the list starts to play. In other words, the playlist can be considered to have a circular structure. . Sample Play_Music O Play_Music F If there is no song in the playlist, it should output "No song to play". If the song is playing it should print this command to the output.txt file ; Playing SAMPLE Playing Music_A

Print_Music_Playlist Prints the names of the songs in the playlist sequentially to the output.txt file. The format of this command is as fallow: Print_Music_Playlist

Specifies the direction in which the song titles in the playlist are written sequentially. Writes the letter "Y" to the output file in order from the beginning to the end of the playlist. The letter "D" writes to the output file in order from the end of the playlist to the beginning.

If there are no songs in the playlist, it was a new line in the output.txt file It should print "No Song to print". EXAMPLE Print_Music_Playlist Y Print_Music_Playlist D Reverse_Music_Playlist: Reverses the order of songs in the playlist. Command format is: Reverse_Music_Playlist

This command has no output. It should not print on the screen or on the output file. The song currently being played should not change while executing the command to reverse the order of the playlist. However, when a new command is given to play the next song in the playlist after this command, the order of the songs in the playlist will be reversed; The previous song in the old version should be played as the next song in the new state of the playlist, and the next song in the old version of the playlist as the previous song in the new version of the playlist.

When command to reverse the order of the playlist is given, there may be no songs in the playlist. In this case, it will not be possible to reverse the order, so no action should be taken on the playlist and nothing should be printed on the screen or output file.Should not produce any output if there are no songs in the playlist The song being played cannot be deleted. If an attempt is made to delete the currently playing song, it should output: "Cannot Delete the Playing music" Example for input and output sample nput.txt Reverse_Music_Playlist Print_Music_Playlist Y Print_Music_Playlist D Play_Music O Play_Music F AddMusic B Music_A AddMusic B Music_B AddMusic B Music_C AddMusic E Music_D AddMusic E Music_E AddMusic E Music_F Print_Music_Playlist Y Move_Music S Music_E Music_D Move_Music R Music_B Music_A Print_Music_Playlist Y DeleteMusic Music_F Print_Music_Playlist Y Play_Music F Play_Music F Play_Music F Play_Music N Print_Music_Playlist Y Print_Music_Playlist D Reverse_Music_Playlist Print_Music_Playlist Y Print_Music_Playlist D Play_Music F Play_Music F Play_Music F Play_Music N DeleteMusic Music_F

Output.txt No Song To Print ***** No Song To Print ***** No Song To Play ***** No Song c To Play ***** Music_C Music_B Music_A Music_D Music_E Music_F ***** Music_C Music_A Music_B Music_E Music_D Music_F ***** Music_C Music_A Music_B Music_E Music_D

***** Playing Music_D ***** Playing Music_E ***** Playing Music_B ***** Playing Music_E ***** Music_C Music_A Music_B Music_E Music_D ***** Music_D Music_E Music_B Music_A Music_C ***** Music_D Music_E Music_B Music_A Music_C ***** Music_C Music_A Music_B Music_E Music_D ***** Playing Music_B ***** Playing Music_A ***** Playing Music_C ***** Playing Music_A ***** Cannot Remove The Playing Song *****

Music player application In a music player application, it is desired to create a playlist that will allow favorite songs to be played back-to-back. There are playlist editing operations such as adding a new song, removing the song from the list, moving a song in the music list to the front or back of another song. In addition, they can play the songs in the playlist in order and listen to the songs they want whenever they want. MISION Only c libraries will be used. No 3rd party code or library. The program to be developed must read a text-based input file, named "input-txt", each line corresponding to the commands that need to be executed. It should read the commands in the "input.txt" file and print the output to an output file named "output.txt". After printing the output found commands to the file, it should print "*****" in a new line to the output file. There is no input limit in input.txt. File operations After the last command in the input.txt file, it should be assumed that there will be one blank line as a new line. File operations should be done accordingly. There is no limit to the number of times to be added to the playlist. A structure should be chosen according to this situation. Very high and low values must be available. Each line in the input file will have a command. Command parameters will be separated by the "tab" key. AddMusic: The song adds a new song to the top or bottom of the playlist. Command format: Add Music command specifies where the song will be added. The letter "E" indicates the song will be added at the end, and the letter "B" indicates the song will be added to the top. This command has no output Nothing should be printed on the screen or in the output file. The name of the song should have a maximum of 50 characters. EXAMPLE: AddMusic B Music E Add Music E Music_B Move_Music: Moves a song in the playlist before or after another-zong in the playlist. Working Format: Move_Music : The letter "S" indicates the song will be placed before the specified song, and the letter "R" indicates the song will be placed after the specified song. music_to_moves: is the name of the song to be moved. (which_musio The song name to be placed before or after the song to be moved. EXAMPLE: Move_Music S Music_E Music A Move_Music R Music_B Music_E Delete Music: Removes the song in the playlist from the playlist. Working format: DeleteMusic is the name of the song to be deleted. Sample: Delete Music Music A Play Music: Plays the previous or next song in the playlist Working Format Play_Music SAMPLE Playing Music_A Print_Music_Playlist Prints the names of the songs in the playlist sequentially to the output.txt file Print_Music_Playlist Print_Music_Playlist command specifies where the song will be added. The letter "E" indicates the song will be added at the end, and the letter "B" indicates the song will be added to the top. This command has no output Nothing should be printed on the screen or in the output file. The name of the song should have a maximum of 50 characters. EXAMPLE: AddMusic B Music E Add Music E Music_B Move_Music: Moves a song in the playlist before or after another-zong in the playlist. Working Format: Move_Music : The letter "S" indicates the song will be placed before the specified song, and the letter "R" indicates the song will be placed after the specified song. music_to_moves: is the name of the song to be moved. (which_musio The song name to be placed before or after the song to be moved. EXAMPLE: Move_Music S Music_E Music A Move_Music R Music_B Music_E Delete Music: Removes the song in the playlist from the playlist. Working format: DeleteMusic is the name of the song to be deleted. Sample: Delete Music Music A Play Music: Plays the previous or next song in the playlist Working Format Play_Music SAMPLE Playing Music_A Print_Music_Playlist Prints the names of the songs in the playlist sequentially to the output.txt file Print_Music_Playlist Print_Music_Playlist

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Finance The Role Of Data Analytics In Manda Due Diligence

Authors: Ps Publishing

1st Edition

B0CR6SKTQG, 979-8873324675

More Books

Students also viewed these Databases questions