// Project II for CS 1704 Spring 2004 // // Programmer: Kyle Loder // OS: Windows XP Professional // System: Pentium IV 2.6 GHz, 512 MB Memory // Compiler: Visual Studio .NET 2003 // Last modified: February 23rd, 2004 // // This class represent the media library organizer. It stores all students and all items, and allows // the operations to be performed on the, // #ifndef LIBRARY #define LIBRARY #include #include #include #include "student.h"; #include "item.h"; using namespace std; using std::string; using std::ifstream; using std::ofstream; class mediaLibrary { public: mediaLibrary (); //default constructor void readStudents (ifstream &Students); //reads in students from a file void readItems (ifstream &Items); //reads in items from a file void printStudents (ofstream &Log); //prints out a list of all students to a file void printItems (ofstream &Log); //prints out a lit of all items to a file short findStudent (string address); //returns the index in "myStudents" of a student, 100 if not found short findBlankStudent (); //finds the index of the first blank space in the myStudents array, 100 if none short findBlankItem (); //finds the index of the first blank space in the myItems array, 100 if none void printStudentItems (string address, ofstream &Log); //prints all items belonging to a student to a file bool printAddress (string address, ofstream &Log); //prints one student to a file by e-mail address void addItem (ifstream &Commands, ofstream &Log); //adds "myItem" to the end of the list of items void addStudent (ifstream &Commands, ofstream &Log); //adds "myStudent" to the end of the list of items void deleteStudent (string address, ofstream &Log); //delete one student from the list void readCommands (ifstream &Commands, ofstream &Log); //read in all commands from a file and print results to a log private: Student myStudents [100]; //array of students Item myItems [100]; //array of items int numStudents; //usage of "myStudents" int numItems; //usage of "numItems" }; #endif;