// Project 2 for CS 1704 Spring 2004 // // Programmer: Nikia R. Johnson // OS: Windows 2000 Professional // System: Pentium III 500, 256 MB Memory // Compiler: Visual C++ 6.0, Service Pack 4 // Last modified: October 12, 2003 // // //****************************************************************************************************** //On my honor: // // //-I have not discussed the C++ language code in my program with anyone //other than my instructor or the teaching assistants assigned to this course. // //-I have not used C++ language code obtained from another student, or any //other unauthorized source, either modified or unmodified. // //-If any C++ language code or documentation used in my program was //obtained from another source, such as a textbook or course notes, that //has been clearly noted with a proper citation in the comments of my //program. // //-I have not designed this program in such a way as to defeat or //interfere with the normal operation of the Curator System. // //Nikia Johnson //************************************************************************************************* #include #include #include #include #include #include "RecordOrg.h" using namespace std; ofstream oFile; ifstream inFile; //********************************************************************************************************** int main() { RecordOrg rec; char emailaddy[50]; //email address from command file char emailaddress[50];//email address from command file char owner[3];//represents wheter on or off option is on for printing owner of an item inFile.open("command.data"); oFile.open("output.data"); char command[50]; RecordOrg(); rec.SetArray(); while (inFile) { inFile.get(command, '<'); if(command == "print students") { rec.PrintStudents(); } if(command == "print items") { inFile.get(owner,4); rec.PrintItems(owner); } if(command == "print") { inFile.get(emailaddress, '>'); rec.PrintEmail(emailaddress); } if(command == "add item") { rec.AddItem(); } if(command == "add student") { rec.AddStudent(); } if(command == "delete") { inFile.get(emailaddy, '>'); rec.Delete(emailaddy); } if(command == "quit") { rec.Quit(); } oFile.close(); inFile.close(); return 0; } }