adding output description
This commit is contained in:
@@ -16,9 +16,9 @@ In this assignment you will develop a program to manage music playlists like Spo
|
||||
|
||||
On Spotify, users can create and manage playlists. On the Spotify app or website, users can navigate to the "Your Library" section and click on the "+" sign to create a playlist. When creating a playlist, users can add music tracks to the playlist.
|
||||
|
||||
After a playlist is created, users can add new tracks to this playlist, or remove tracks from this playlist. Users can also re-order tracks within a playlist. The following two images show the re-order process:
|
||||
After a playlist is created, users can add new tracks to this playlist, or remove tracks from this playlist. Users can also move tracks to new positions within a playlist. The following two images show the moving process:
|
||||
|
||||
Before re-ordering, track 1 is "Perfect Duet", track 2 is "Always Remember Us This Way", track 3 is "Million Reasons", and track 4 is "I'll Never Love Again".
|
||||
At first, track 1 is "Perfect Duet", track 2 is "Always Remember Us This Way", track 3 is "Million Reasons", and track 4 is "I'll Never Love Again".
|
||||
|
||||

|
||||
|
||||
@@ -32,31 +32,30 @@ After this dragging action, now, track 1 is still "Perfect Duet", track 2 is "I'
|
||||
|
||||
Your program will support 3 commands.
|
||||
|
||||
### Command 1: add a music track
|
||||
### Command 1: add a music track to a playlist
|
||||
The first argument is the name of an input file which contains a playlist. The second argument is the name of another input file which contains all available music tracks. The third argument is the output file. The fourth argument is the action, which in this case is "add". The fifth argument is the title of the music track.
|
||||
|
||||
```console
|
||||
./nyplaylists.exe playlist.txt library.txt output.txt add title
|
||||
```
|
||||
|
||||
### Command 2: remove a music track
|
||||
### Command 2: remove a music track to a playlist
|
||||
The first argument is the name of an input file which contains a playlist. The second argument is the name of another input file which contains all available music tracks. The third argument is the output file. The fourth argument is the action, which in this case is "remove". The fifth argument is the title of the music track.
|
||||
|
||||
```console
|
||||
./nyplaylists.exe playlist.txt library.txt output.txt remove title
|
||||
```
|
||||
|
||||
### Command 3: move a music track to a new position
|
||||
### Command 3: move a music track to a new position on the playlist
|
||||
The first argument is the name of an input file which contains a playlist. The second argument is the name of another input file which contains all available music tracks. The third argument is the output file. The fourth argument is the action, which in this case is "move". The fifth argument is the title of the music track. The sixth argument is the new position - where this user wants the music track to be located on the playlist. Note that, unliked array indexing in C/C++, positioning in Spotify starts at 1, as opposed to 0. This can be seen in the above Spotify screenshot: the first position is position 1.
|
||||
|
||||
```console
|
||||
./nyplaylists.exe playlist.txt library.txt output.txt move title [new_position]
|
||||
```
|
||||
|
||||
You should implement very simple error checking to ensure that 5 or 6 arguments are provided and that the input and output file streams are successfully opened. You should also check that the value for the fifth argument is valid. Your program should exit gracefully with a useful error message sent to std::cerr if there is a problem with the arguments.
|
||||
For all 3 commands, the output.txt contains the updated playlist. We have provided sample input & output files. Examples of using command line arguments can be found on the course webpage: [Programming Information](https://www.cs.rpi.edu/academics/courses/spring24/csci1200/programming_information.php).
|
||||
|
||||
You must follow the specifications for the command line, input file, and output file exactly to ensure you receive full credit from the Submitty homework submission autograder. We have provided sample input & output files on the course website. Examples of using command line arguments can be found on the course
|
||||
webpage: [Programming Information](https://www.cs.rpi.edu/academics/courses/spring24/csci1200/programming_information.php).
|
||||
You should implement very simple error checking to ensure that 5 or 6 arguments are provided and that the input and output file streams are successfully opened. You should also check that the value for the fifth argument is valid. Your program should exit gracefully with a useful error message sent to std::cerr if there is a problem with the arguments.
|
||||
|
||||
## Submission Details
|
||||
|
||||
|
||||
Reference in New Issue
Block a user