Hi, this is my first time in this forum and i have to make a program that reads songs of a dataset, i have done a class song (attributes are the same that the class addsong have), my question is how should i do the private part? i think i should use two maps one for each dataset i have(one reads tid and the other reads mXm_tid)
class songs
{
// A set of songs, indexed by both tid and mXm_tid, and a list of words.
public:
songs();
std::shared_ptr<Song> addSong(const std::string tid,
const std::string MSD_artist_name,
const std::string MSD_title,
const std::string mXm_tid,
const std::string mXm_artist_name,
const std::string mXm_title);
// Pre: there is no song with this tid and mXm_tid in this set of songs
// Post: the song has been added and a shared pointer to it is returned
bool deleteSong(const std::string id);
// Pre: --
// Post: the song with (tid == id) or (mXm_tid == id) in this set has been deleted; says if it succeeded
void addWord(const std::string s);
// Pre: --
// Post: s has been added as the last word in the list of words
std::shared_ptr<Song> getSong(const std::string id) const;
// Pre: --
// Post: if there is a song (tid == id) or (mXm_tid == id) in this setmthen returns a pointer to this song; otherwise it returns nullptr
std::set<std::pair<std::string, std::string> > songsWithWord(std::string w) const;
// Pre: --
// Post: returns the set of pairs <mXm_artist_name, mXm_title> of songs with word w
std::list<std::string> mostFrequentWordsIn(const std::string id) const;
// Pre: --
// Post: if there is a song (tid == id) or (mXm_tid == id) in this set then returns the list of its most frequent words; otherwise it returns an empty list
std::set<std::string> mostFrequentN(ushort n) const;
// Pre: --
// Post: returns the n most frequent words in this set of songs