00001
00002
00003
00004 #ifndef __OCOURSE_H
00005 #define __OCOURSE_H
00006
00007 #ifndef __ODYNARRB_H
00008 #include <ODYNARRB.H>
00009 #endif
00010
00011
00012
00013 #define STD_COURSE_PER_TRIMESTER 4 // total number of courses in a trimester
00014 #if(GAME_VERSION>=200)
00015 #define STD_COURSE_NUG_PER_TRIMESTER 2
00016 #endif
00017 #define STD_COURSE_PER_YEAR (STD_COURSE_PER_TRIMESTER * 2)
00018
00019 #define TOTAL_REQUIRED_COURSE 4
00020 #define TOTAL_ELECTIVE_COURSE 2
00021
00022 #define CONTACT_HOUR_PER_COURSE 3 // needed contact hours of a faculty for teaching a section of the selected course
00023
00024 #define MAX_YEAR_REQUIRE_ELECTIVE_COURSE 4 // maximum number of years in program that require taking elective courses, for defining the size of Department::min_elective_course_by_year[MAX_YEAR_REQUIRE_ELECTIVE_COURSE]
00025
00026
00027
00028 #define COURSE_COUNT_REQUIRED_FOR_BACHELOR 32
00029 #define COURSE_COUNT_REQUIRED_FOR_MASTER 8
00030 #define COURSE_COUNT_REQUIRED_FOR_DOCTOR 16
00031
00032
00033
00034 #define MAX_COURSE_DEPTH 4
00035 #define MAX_COURSE_DEPTH_WITHOUT_GR 3
00036
00037 enum {
00038 DEPTH_D1, DEPTH_D2, DEPTH_D3, DEPTH_GR
00039 };
00040
00041
00042
00043 #define MAX_COURSE_FOCUS 4
00044 #define MAX_COURSE_FOCUS_WITHOUT_GR 3
00045
00046 enum {
00047 FOCUS_LD, FOCUS_M, FOCUS_UD, FOCUS_GR
00048 };
00049
00050
00051
00052 #define MAX_COURSE_DEPTH_FOCUS 7
00053
00054 enum {
00055 D1_LD, D1_M, D1_UD, D2_M, D2_UD, D3_UD, GR
00056 };
00057
00058
00059
00060 enum {
00061 MAX_TEACHING_METHOD = 5,
00062 MAX_TEACHING_METHOD_N_TOTAL,
00063 };
00064
00065
00066
00067
00068
00069
00070
00071 enum {
00072 SEMINAR, DISTANCE_LEARN_COURSE, CLASS_WITH_BREAKOUT, BREAKOUT_LAB, GENERAL,
00073 };
00074
00075
00076
00078 class Course {
00079 public:
00080 short course_recno;
00081 short department_recno;
00082
00083 char depth_category;
00084 char focus_category;
00085
00086 char teaching_method;
00087 char is_closed;
00088
00089 #if(GAME_VERSION>=200)
00090 int distance_learning_place;
00091 int actual_distance_learning_enrollment;
00092 #endif
00093
00094
00095
00096 short convention_student_count;
00097
00098 short distance_student_count;
00099
00100 int normal_class_size();
00101
00102 short admission_denied_count;
00103 short failure_count;
00104
00105 #if(GAME_VERSION>=200)
00106 short outsourcing_credits;
00107 #endif
00108
00109 short class_section_count;
00110 short cur_section_student_count;
00111
00112 public:
00113 int write_file(File* filePtr);
00114 int read_file(File* filePtr);
00115
00116 void next_trimester();
00117 void reset_vars();
00118 };
00119
00120
00121
00123 class CourseArray : public DynArrayB {
00124 public:
00125 int department_recno;
00126 int course_enrollments[MAX_TEACHING_METHOD];
00127
00128
00129 int class_section_count[MAX_TEACHING_METHOD_N_TOTAL];
00130 int convention_student_count[MAX_TEACHING_METHOD_N_TOTAL];
00131 int average_class_size[MAX_TEACHING_METHOD_N_TOTAL];
00132 int normal_class_size[MAX_TEACHING_METHOD_N_TOTAL];
00133
00134 int size_deviation[MAX_TEACHING_METHOD_N_TOTAL];
00135 int admission_denied_count[MAX_TEACHING_METHOD_N_TOTAL];
00136 int failure_count[MAX_TEACHING_METHOD_N_TOTAL];
00137
00138 #if(GAME_VERSION>=200)
00139 int outsourcing_credits[MAX_TEACHING_METHOD_N_TOTAL];
00140 #endif
00141
00142 int experienced_class_size[HISTORY_TRIMESTER_COUNT];
00143
00144 #if(GAME_VERSION>=200)
00145
00146 int class_section_count_history[MAX_TEACHING_METHOD_N_TOTAL][HISTORY_TRIMESTER_COUNT];
00147 int convention_student_count_history[MAX_TEACHING_METHOD_N_TOTAL][HISTORY_TRIMESTER_COUNT];
00148 int size_deviation_history[MAX_TEACHING_METHOD_N_TOTAL][HISTORY_TRIMESTER_COUNT];
00149 int admission_denied_count_history[MAX_TEACHING_METHOD_N_TOTAL][HISTORY_TRIMESTER_COUNT];
00150 int failure_count_history[MAX_TEACHING_METHOD_N_TOTAL][HISTORY_TRIMESTER_COUNT];
00151
00152 #if(GAME_VERSION>=200)
00153 int outsourcing_credits_history[MAX_TEACHING_METHOD_N_TOTAL][HISTORY_TRIMESTER_COUNT];
00154 #endif
00155
00156 int initial_class_section_count[MAX_TEACHING_METHOD_N_TOTAL];
00157 int initial_convention_student_count[MAX_TEACHING_METHOD_N_TOTAL];
00158 int initial_average_class_size[MAX_TEACHING_METHOD_N_TOTAL];
00159 int initial_size_deviation[MAX_TEACHING_METHOD_N_TOTAL];
00160 int initial_admission_denied_count[MAX_TEACHING_METHOD_N_TOTAL];
00161 int initial_failure_count[MAX_TEACHING_METHOD_N_TOTAL];
00162 int initial_normal_class_size[MAX_TEACHING_METHOD_N_TOTAL];
00163
00164 int initial_experienced_class_size;
00165 #endif
00166
00167 public:
00168 CourseArray();
00169 ~CourseArray();
00170
00171 int write_file(File* filePtr);
00172 int read_file(File* filePtr);
00173
00174 void add(Course *newCourse);
00175 void del(int recNo);
00176
00177 #if(GAME_VERSION>=200)
00178 void next_day(int initial=0);
00179 #else
00180 void next_day();
00181 #endif
00182 void next_trimester();
00183 void update_history();
00184
00185 Course* get_course(int courseDepth, int courseFocus, int teachingMethod);
00186
00187 int get_depth(int depthFocusId);
00188 int get_focus(int depthFocusId);
00189
00190 int is_deleted(int recNo);
00191
00192
00193 #if(GAME_VERSION>=200)
00194 void save_initial_data();
00195 #endif
00196
00197
00198 #ifdef DEBUG
00199 Course* operator[](int recNo);
00200 #else
00201 Course* operator[](int recNo) { return (Course*) get(recNo); }
00202 #endif
00203 };
00204
00205
00206 #endif