/*************************************************************************/ /* File: ins_DB.h Author: B. De Hamer */ /* */ /* Class InsDB is derived from GenericDB and is used to hold each of the */ /* the instructors and their time and class preferences. The InsDB will */ /* only hold things of type InsRec which will be derived from DBItem. */ /* Add and delete operations will exist for items in the InsDB. */ /*************************************************************************/ #ifndef INS_DB #define INS_DB #include #include #include #include #include "std-macros.h" #include "DB.h" #include "ins_rec.h" #include "ins_name.h" class InsDB : public GenericDB { public: InsDB () ; // Constructs a default InsDB InsDB (const InsDB&) ; // Constructs a new InsDB from an existing one ~InsDB () ; // Destructs and InsDB void Add (const InsName&) ; // Adds an instructor with the given name to the database void Add (const InsRecord&) ; // Add the given instructor record to the database Boolean Delete (const InsName&) ; // Deletes the given instructor from the database // Returns true if the operation was successful // Returns false otherwise void View (const InsName&) ; // Finds the given instructor in the database and displays // his/her course and day/time preferences InsRecord* GetInstructor () ; // Returns the next pickiest instructor in the database. // If there are no more instructors, the function returns // returns to the beginning and returns the most picky // instructor void print() const ; // Print the database void PickySort () ; // Sorts the InsDB in order or instructor pickiness. void Read () ; // Read the database from file }; #endif