Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

STANDART C Linked List Basic Project Similarly TO This project : https://www.chegg.com/homework-help/questions-and-answers/project-written-c-language-c-c-also-use-standart-c-library-libraries-allowed-inputtxt-file-q63254011 This Project should be written in C Language Not C++ or C# DATA

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

STANDART C Linked List Basic Project Similarly TO This project : https://www.chegg.com/homework-help/questions-and-answers/project-written-c-language-c-c-also-use-standart-c-library-libraries-allowed-inputtxt-file-q63254011 This Project should be written in C Language Not C++ or C# DATA STRUCTURES Linked List Input and Output given below Insert Song -- MoveSong-- RemoveSong -- PlaySong -- PrintPlaylist -- ReversePlaylist-- A sample input and its corresponding output is given below

INPUT FILE

ReversePlaylist PrintPlaylist F PrintPlaylist R PlaySong N PlaySong P InsertSong H Song_A InsertSong H Song_B InsertSong H Song_C InsertSong T Song_D InsertSong T Song_E InsertSong T Song_F PrintPlaylist F MoveSong B Song_E Song_D MoveSong A Song_B Song_A PrintPlaylist F RemoveSong Song_F PrintPlaylist F PlaySong P PlaySong P PlaySong P PlaySong N PrintPlaylist F PrintPlaylist R ReversePlaylist PrintPlaylist F PrintPlaylist R PlaySong N PlaySong N PlaySong N PlaySong P RemoveSong Song_A

OUTPUT FILE

No Songs To Print ***** No Songs To Print ***** No Songs To Play ***** No Songs To Play ***** Song_C Song_B Song_A Song_D Song_E Song_F ***** Song_C Song_A Song_B Song_E Song_D Song_F ***** Song_C Song_A Song_B Song_E Song_D ***** Playing Song_D ***** Playing Song_E ***** Playing Song_B ***** Playing Song_E ***** Song_C Song_A Song_B Song_E Song_D ***** Song_D Song_E Song_B Song_A Song_C ***** Song_D Song_E Song_B Song_A Song_C ***** Song_C Song_A Song_B Song_E Song_D ***** Playing Song_B ***** Playing Song_A ***** Playing Song_C ***** Playing Song_A ***** Cannot Remove The Playing Song *****

Please help me I need to understand how can I solve this. I will like your answer :)

Submission Due Date: 24.01.2021 - 23:59 Development Environment: Standard C INTRODUCTION - Music Player In a music player application, there is the possibility to create a playlist that will allow you to listen to the favorite songs by playing them back to back. In this music player application, users are offered playlist editing operations such as adding new songs to their playlists, moving a song in their playlist to another desired order on the list, or removing the desired song from the list. At the same time, users are offered operations to play songs in this playlist sequentially and to skip to the previous or next songs. In this way, users can create playlists according to their own musical tastes and listen to the songs they want whenever they want. EXPERIMENT TASKS In this assignment, it is expected to develop a program that will deal with editing the playlist and playing songs of the music player application. This program to be developed must read a text-based input file, which will be named "input.txt" and each line corresponds to the commands that need to be executed, and by executing the commands in this file in order, the outputs of the commands will be written into a text-based output file to be named "output.txt". should write in the format. In addition, after printing the output produced by the commands with output to the file, 5 asterisk characters ("*****") should be written as a new line in the output file. Commands Each line in the input file will have a single command, and all command names and command parameters will be tab separated (tab character). InsertSong: Adds a new song to the top or bottom of the playlist. The format of this command is as follows: InsertSong specifies the place where the new song to be added will be added: the letter "H" indicates the top of the playlist of the song to be added, and the letter "T" indicates that the song to be added will be added to the end of the playlist. specifies the name of the song to be added, and it is guaranteed to be a string of up to 50 English characters. Examples: InsertSong Song_A InsertSong Song_B InsertSong Song_ InsertSong Song_D InsertSong Song_E InsertSong Song_F H H H T T T This command has no output, so nothing should be printed on the screen or in the output file. Move Song: Moves a song in the playlist before or after another song in the playlist. The format of this command is as follows: MoveSong specifies the name of the song to be moved. indicates the name of the song that will be placed before and after the song to be moved. Both song titles are guaranteed to be a valid song title included in the playlist. Examples: Move Song Move Song B Song_E Song_B Song_D Song A This command has no output, so nothing should be printed on the screen or in the output file. The song to be moved with the song move command can be a song that is currently being played. In this case, the song currently being played should not change while executing the song move command. However, when a new command is given to play the next song in the playlist after this command, the next (previous or next) song in the playlist must be determined according to the new position where the moved song is placed. Remove Song: Removes a song in the playlist from the playlist. The format of this command is as follows: RemoveSong indicates the direction of the next song to be played: the letter "N" indicates the next song, and the letter "P" indicates the previous song will be played. Examples: PlaySong N PlaySong 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 ("N") on the first play command, the song at the top of the playlist starts playing, and if the playback direction is the previous ("P"), the song at the end of the playlist starts to play. Similarly, if the command to play the previous song (PlaySong P) 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 (PlaySong N), 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. An information message in the following format containing the name of the song being played should be printed as a new line in the output file each time the play command is executed: Playing There may not be any songs in the playlist when playing is commanded. In this case, it will not be possible to play the next song. An information message in the following format should be printed as a new line in the output file to indicate this situation: No Songs To Play PrintPlaylist: Prints the names of the songs in the playlist to the output file in order. The format of this command is as follows: PrintPlaylist specifies the place where the new song to be added will be added: the letter "H" indicates the top of the playlist of the song to be added, and the letter "T" indicates that the song to be added will be added to the end of the playlist. specifies the name of the song to be added, and it is guaranteed to be a string of up to 50 English characters. Examples: InsertSong Song_A InsertSong Song_B InsertSong Song_ InsertSong Song_D InsertSong Song_E InsertSong Song_F H H H T T T This command has no output, so nothing should be printed on the screen or in the output file. Move Song: Moves a song in the playlist before or after another song in the playlist. The format of this command is as follows: MoveSong specifies the name of the song to be moved. indicates the name of the song that will be placed before and after the song to be moved. Both song titles are guaranteed to be a valid song title included in the playlist. Examples: Move Song Move Song B Song_E Song_B Song_D Song A This command has no output, so nothing should be printed on the screen or in the output file. The song to be moved with the song move command can be a song that is currently being played. In this case, the song currently being played should not change while executing the song move command. However, when a new command is given to play the next song in the playlist after this command, the next (previous or next) song in the playlist must be determined according to the new position where the moved song is placed. Remove Song: Removes a song in the playlist from the playlist. The format of this command is as follows: RemoveSong indicates the direction of the next song to be played: the letter "N" indicates the next song, and the letter "P" indicates the previous song will be played. Examples: PlaySong N PlaySong 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 ("N") on the first play command, the song at the top of the playlist starts playing, and if the playback direction is the previous ("P"), the song at the end of the playlist starts to play. Similarly, if the command to play the previous song (PlaySong P) 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 (PlaySong N), 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. An information message in the following format containing the name of the song being played should be printed as a new line in the output file each time the play command is executed: Playing There may not be any songs in the playlist when playing is commanded. In this case, it will not be possible to play the next song. An information message in the following format should be printed as a new line in the output file to indicate this situation: No Songs To Play PrintPlaylist: Prints the names of the songs in the playlist to the output file in order. The format of this command is as follows: PrintPlaylist

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 For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

STANDART C Linked List Basic Project Similarly TO This project :...

Answered: 1 week ago