//------------------------------------------------------------------- // File :library.h // Author :Alicia Thorsen // Course :CS1129 // // Library class //------------------------------------------------------------------- #ifndef LIBRARY_H #define LIBRARY_H #include "song.h" #include using namespace std; //------------------------------------------------------------------- // CONSTANTS // ------------------------------------------------------------------- const int MAX_LIB_SIZE = 100; const int MAX_ID = 3; const int MAX_TITLE = 30; const int MAX_ALBUM = 25; const int MAX_ARTIST = 25; const int MAX_GENRE = 25; const char LIBRARY_FILE[] = "musicLibrary.txt"; class Library { public: Library() : libSize(0), libEnd(0) {} void loadLibrary(); void showLogo(); char showMenu(); void addSong(); void deleteSong(); void displayLib(); void showLibStats(); void save(); bool quit(); private: Song songs[MAX_LIB_SIZE]; // Music library int libSize; // # of undeleted songs int libEnd; // Index after last song ifstream inputFile; // Input file stream. ofstream outputFile; // Output file stream. }; #endif