CSCI 1200 Data Structures

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":

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值