Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Only c libraries will be used. No 3rd party code or library. There is no input limit in input.txt. File operations After the last command

Only c libraries will be used. No 3rd party code or library. 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. After the commands that produce output print the output to the file, a new line in the output file is written "*****" It should be printed. AddMusic: Adds a new music to the top or bottom of the music playlist. Command format AddMusic specifies where the music will be inserted. The letter "E" indicates the music will be added at the end, and the letter "B" indicates the music 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 music should contain a maximum of 50 characters. SAMPLE: AddMusic B Music_E AddMusic E Music_B

Move_Music: Moves a music in the playlist before or after another music in the playlist. Working format: Move_Music The letter "S" indicates the music will be placed before the specified music, and the letter "R" indicates the music will be placed after the specified music. : is the name of the music to be moved. The music name to be placed before or after the music to be moved. Sample: Move_Music S Music_E Music_A Move_Music R Music_B Music_E

DeleteMusic: Deletes the music in the playlist from the playlist. Working format DeleteMusic is the name of the music to be deleted. Sample: DeleteMusic Music_A Play_Music: Plays the previous or next music in the playlist. Play_Music determines the direction of the music to be played. The letter "O" means the next music will be played, and the letter "F" means the previous music will be played. If the "F" command appears for the lead music, it should play the last music in the list. If the "O" command appears for the last music, the top music in the list should play. Sample PlayMusic O PlayMusic F If there is no music in the playlist, it should output "No music to play". If the music is playing it should print this command to the output.txt file; Playing

Print_Music_Playlist Prints the names of the musics in the playlist sequentially to the output.txt file Print_Music_Playlist Print_Music_Playlist : Specifies the direction in which the music titles in the playlist are printed sequentially. The letter "Y" writes 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 musics in the playlist, it was a new line in the output.txt file It should print "No Music to print". Sample Print_Music_Playlist Y Print_Music_Playlist D Reverse_Music_Playlist: Reverses the order of musics in the playlist. Command format Reverse_Music_Playlist This command has no output. It should not print on the screen or on the output file. The music currently being played should not change while the order of the playlist changes. When I am commanded to play the next music in the playlist. If A - B - C, let B be the music playing. When we reverse the playlist it will be C- B- A. A should play when he says skip to the next music. When the previous music says, C should play. Should not produce any output if there are no musics in the playlist The played music should be output as indelible output Cannot Delete the Playing music Example output main input Input Reverse_Music_Playlist Print_Music_Playlist Y Print_Music_Playlist D PlayMusic O PlayMusic F AddMusic B Music_A AddMusic B Music_B AddMusic B Music_C AddMusic E Music_D PrintPlaylist Y MoveMusic R Music_B Music_A PrintPlaylist Y RemoveMusic Music_D PrintPlaylist Y PlayMusic F

Output.txt No Music To Print ***** No Music To Print ***** No Music To Play ***** No Music To Play ***** Music_C Music_B Music_A Music_D ***** Music_C Music_A Music_B Music_D ***** Music_C Music_A Music_B ***** Playing Music_B *****

Thank for your help.

I want to be write music player program in C. There is a one Playlist. There are 2 txt file input.txt file and output.txt file. In this program should write only in output.txt. There is a 5 features in program. AddMusic , Delete music, play music move music, print music, reverse music. AddMusic don't have any output. Delete music don't have any output. Play music output is "Playing musicA" if there is no song to play, output should be " Every features writing format is in the upper text.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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. I 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 sone will be added. The letter "E" indicates the song will be added at the end, and the letter e' indicates the sone 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: Add Music Music E AddMusic 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 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: DeleteMusic Music A Play Music: Plays the previous or next song in the playlist. Working Format Play_Music determines the direction of the song to be played. The letter "O" means the next song will be played, and the letter "F" means the previous song will be played. If the "F" command appears for the lead song, it should play the last song in the list. If the "O" command appears for the last song, the top song in the list should play. Sample I 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 (tab> 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 sone will be added. The letter "E" indicates the song will be added at the end, and the letter e' indicates the sone 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: Add Music Music E AddMusic 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 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: DeleteMusic Music A Play Music: Plays the previous or next song in the playlist. Working Format Play_Music determines the direction of the song to be played. The letter "O" means the next song will be played, and the letter "F" means the previous song will be played. If the "F" command appears for the lead song, it should play the last song in the list. If the "O" command appears for the last song, the top song in the list should play. Sample I 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 (tab> 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

Step: 3

blur-text-image

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

Sql All In One For Dummies 7 Books In One

Authors: Allen G Taylor ,Richard Blum

4th Edition

1394242298, 978-1394242290

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago