CSCI 1200 Data Structures
Homework 1-Spotify Playlists
Before starting this homework, make sure you have read and understood the Academic Integrity Policy.
In this assignment you will develop a program to manage music playlists like Spotify does, let's call this program New York Playlists. Please read the entire handout before starting to code the assignment.
Learning Objectives
Practice handling command line arguments.
Practice handling file input and output.
Practice the C++Standard Template Library string and vector classes.
Background
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 move tracks to new positions within a playlist. The following two images show the moving process:
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".
Next, we drag track 4 up to right above track 2.
After this dragging action, now, track 1 is still "Perfect Duet", track 2 is "I'll Never Love Again", track 3 is "Always Remember Us This Way", and track 4 is "Million Reasons".
Next and Previous Button
When using Spotify, if users press the "Next" button, Spotify will skip the currentlyplaying song and starts playing the song that is listed directly after it; if users pressthe "Previous" button, Spotify will go to the song listed directly before the currentlyplaying song.
The following images show the behavior. of pressing "Next".
Before pressing "Next", the currently playing song is "Always Remember Us This Way":
Press "Next":
After pressing "Next", the currently playing song is now "Million Reasons":
The following images show the behavior. of pressing "Previous".
Before pressing "Previous", the currently playing song is "Million Reasons":
Press "Previous":
After pressing "Previous", the currently playing song is "Always Remember Us This Way":