Question: #ifndef LOADEDSONGS _ H #define LOADEDSONGS _ H #include song.h class Playlist { private: Song * firstSong , * lastSong; int numberSongsLoaded; string name;
#ifndef LOADEDSONGSH
#define LOADEDSONGSH
#include "song.h
class Playlist
private:
Song firstSonglastSong;
int numberSongsLoaded;
string name;
have a private method to check if song is already in playlist
bool isSongInPlaylistconst Song& songconst;
have a private method to add a new song to end of playlist this gets called from the operator overload
void addSongToEndconst Song& song;
have a private method to delete song from end of list this gets called from operator overload
void deleteSongFromEnd;
public:
constructors and destructor
Playlist;
Playlistconst string& playlistname;
Playlistconst Playlist& rhs;
~Playlist;
getters
string getNameconst;
int getNumSongsLoadedconst;
setters
void setNameconst string& newName;
adder for new song at specified index location
void addSongAtint index, const Song& song;
delete song from specific index location
void deleteSongAtint index;
method for getting a song at index
const Song getSongAtint indexconst;
void displayLoadedSongsbooltrueconst;
Playlist& operatorconst Playlist& rhs;
friend ostream & operator ostream &out, const Playlist &p;
void operatorconst Song& song;
void operatorint index;
;
#endif
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
