#include #include "university.h" using namespace std; void University::EndSemester (void) const { cout << "Students have finished taking exams" << endl; cout << "Grades have been posted" << endl; cout << "Commencement" << endl; } void University::GoOnBreak(int days, string msg) const { cout << "Campus closed for " << days << " day(s)" << endl; cout << msg << endl; } void University::StartSemester(void) const { cout << "Campus is open again" << endl; cout << "Students dispair" << endl; cout << "Students pay fees" << endl; } University::University(void) : MAX_PROF(6), MAX_DEPT(4) { // MAX_PROF = 6; // MAX_DEPT = 4; CurrentSemester = 0; NumberOfStudents = 600; cout << "University created" << endl; // Professors = (string*) malloc(MAX_PROF * sizeof(string)); Professors = new string[MAX_PROF]; // Professors = (string**) malloc(MAX_PROF * sizeof(string*)); // Professors = new string*[MAX_PROF]; // for(int i=0; i < MAX_PROF; i++) // Professors[i] = new string; Professors[0] = "Jon A. Preston"; Professors[1] = "Bobby Marcus"; Professors[2] = "Larry Booth"; Professors[3] = "Jeff Chastine"; Professors[4] = "Jan Towslee"; Professors[5] = "Farah Azordigan"; // *Professors[0] = "Jon A. Preston"; // *Professors[1] = "Bobby Marcus"; // *Professors[2] = "Larry Booth"; // *Professors[3] = "Jeff Chastine"; // *Professors[4] = "Jan Towslee"; // *Professors[5] = "Farah Azordigan"; } University::~University() { // for (int i=0; i < MAX_PROF; i++) // delete Professors[i]; // free(Professors); delete [] Professors; cout << "University destroyed" << endl; } void University::PrintProfs(void) const { for (int i=0; i < MAX_PROF; i++) cout << Professors[i] << endl; // for (int i=0; i < MAX_PROF; i++) // cout << *Professors[i] << endl; }