Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

DepartmentArray class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

DepartmentArray Class Reference

#include <Odept.h>

Inheritance diagram for DepartmentArray:

DynArrayB DynArray List of all members.

Public Methods

 DepartmentArray ()
 ~DepartmentArray ()
void init ()
void deinit ()
void init_data ()
int write_file (File *filePtr)
int read_file (File *filePtr)
int add (int departmentId)
void del (int recNo)
int create_dept ()
void next_day ()
int is_deleted (int recNo)
int has_department (char *departmentName)
Departmentoperator[] (int departmentRecno)
void salary_setting ()
void faculty_hiring ()
void calc_course_pref ()
void calc_faculty_student_history ()
void update_history (char update_flag)
void init_research ()
void p_sort_performance ()
void calc_course_history ()
void calc_research_history ()

Static Public Methods

int salary_weight_input_2_multiplier (char weightInput)

Public Attributes

int department_count
int selected_recno
int last_selected_recno
char current_screen_mode
char current_pref_report_type
char current_data_mode
char current_report_type
float weight_teaching
float weight_scholarship
float weight_research
float rank_age_group_salary_increase_multiplier [MAX_RANK_AGE_GROUP]
float teaching_weight_input
float scholarship_weight_input
float research_weight_input
float gender_ethnic_equity_weight_input
float k1con
float k2con
int faculty_count_on_tenure_line
int faculty_count_tenured
int faculty_rank_in_teaching_talent
int faculty_rank_in_scholarship_talent
int faculty_rank_in_research_talent
float p_educational_quality_history [HISTORY_TRIMESTER_COUNT]
float p_academic_standing_history [HISTORY_YEAR_COUNT]
float p_student_morale_history [HISTORY_TRIMESTER_COUNT]
float p_faculty_research_history [HISTORY_MONTH_COUNT]
float p_faculty_morale_history [HISTORY_MONTH_COUNT]
float p_faculty_diversity_history [HISTORY_YEAR_COUNT]
int p_educational_quality_sort [MAX_DEPARTMENT]
int p_academic_standing_sort [MAX_DEPARTMENT]
int p_student_morale_sort [MAX_DEPARTMENT]
int p_faculty_research_sort [MAX_DEPARTMENT]
int p_faculty_morale_sort [MAX_DEPARTMENT]
int p_faculty_diversity_sort [MAX_DEPARTMENT]
int total_student_count
int total_faculty_count
int faculty_level_history [FACULTY_RANK_LEVEL_COUNT_N_TOTAL][HISTORY_YEAR_COUNT]
int faculty_gender_history [GENDER_ETHNIC_TYPE_COUNT_N_TOTAL][HISTORY_YEAR_COUNT]
int student_level_history [MAX_STUDENT_LEVEL_N_TOTAL][HISTORY_YEAR_COUNT]
int student_gender_history [GENDER_ETHNIC_TYPE_COUNT_N_TOTAL][HISTORY_YEAR_COUNT]
float teaching_contact_hour [HISTORY_TRIMESTER_COUNT]
float discretionary_hour_array [DISCRETIONARY_TYPE_COUNT_N_TOTAL][HISTORY_TRIMESTER_COUNT]
int average_research_dollars [FACULTY_RANK_LEVEL_COUNT]
float research_m_history [RESEARCH_STATUS_COUNT][HISTORY_MONTH_COUNT]
float research_y_history [RESEARCH_STATUS_COUNT][HISTORY_YEAR_COUNT]
int research_total_history [HISTORY_MONTH_COUNT]
int research_direct_history [HISTORY_MONTH_COUNT]
int regular_faculty_with_research [HISTORY_MONTH_COUNT]
float talent_teaching [HISTORY_TRIMESTER_COUNT]
float talent_scholarship [HISTORY_TRIMESTER_COUNT]
float talent_research [HISTORY_TRIMESTER_COUNT]
float performance_teaching [HISTORY_TRIMESTER_COUNT]
float performance_scholarship [HISTORY_TRIMESTER_COUNT]
float performance_research [HISTORY_TRIMESTER_COUNT]
int class_section_count [MAX_TEACHING_METHOD_N_TOTAL]
int convention_student_count [MAX_TEACHING_METHOD_N_TOTAL]
int average_class_size [MAX_TEACHING_METHOD_N_TOTAL]
int normal_class_size [MAX_TEACHING_METHOD_N_TOTAL]
int size_deviation [MAX_TEACHING_METHOD_N_TOTAL]
int admission_denied_count [MAX_TEACHING_METHOD_N_TOTAL]
int failure_count [MAX_TEACHING_METHOD_N_TOTAL]
int experienced_class_size [HISTORY_TRIMESTER_COUNT]

Detailed Description

Collection class for Department. Delegates next_day() calls to the departments, and handles aggregate academic information and interactions with students (i.e., course selection).

Definition at line 390 of file Odept.h.


Constructor & Destructor Documentation

DepartmentArray::DepartmentArray  
 

Definition at line 18 of file Odepta.cpp.

DepartmentArray::~DepartmentArray  
 

Definition at line 25 of file Odepta.cpp.


Member Function Documentation

int DepartmentArray::add int    departmentId
 

Definition at line 140 of file Odepta.cpp.

References department_count, err_when, DynArray::get_ptr(), Department::init(), DynArrayB::linkin(), MAX_DEPARTMENT, DynArray::recno(), and selected_recno.

void DepartmentArray::calc_course_history  
 

Definition at line 553 of file Odepa_pi.cpp.

References CourseArray::admission_denied_count, admission_denied_count, CourseArray::average_class_size, average_class_size, BREAKOUT_LAB, CourseArray::class_section_count, class_section_count, CourseArray::convention_student_count, convention_student_count, Department::course_array, department_count, DISTANCE_LEARN_COURSE, experienced_class_size, CourseArray::failure_count, failure_count, MAX_TEACHING_METHOD, CourseArray::normal_class_size, normal_class_size, operator[](), shift_history, DynArray::size(), size_deviation, and Course::teaching_method.

void DepartmentArray::calc_course_pref  
 

Definition at line 315 of file Odepta.cpp.

References Department::course_preference, COURSE_PREFERENCE_COUNT, Department::course_preference_input, GeneralDepartment::department_id, err_when, is_deleted(), operator[](), DynArray::size(), and CourseTemplate::target_preference.

void DepartmentArray::calc_faculty_student_history  
 

Definition at line 720 of file Odepa_pi.cpp.

References err_when, Department::faculty_array, FacultyArray::faculty_count, Department::faculty_gender_history, faculty_gender_history, Department::faculty_level_history, faculty_level_history, FACULTY_RANK_LEVEL_COUNT_N_TOTAL, GENDER_ETHNIC_TYPE_COUNT, GENDER_ETHNIC_TYPE_COUNT_N_TOTAL, is_deleted(), MAX_STUDENT_LEVEL_N_TOTAL, DynArray::size(), GeneralDepartment::student_array, StudentArray::student_count, GeneralDepartment::student_gender_history, student_gender_history, GeneralDepartment::student_level_history, student_level_history, total_faculty_count, and total_student_count.

void DepartmentArray::calc_research_history  
 

Definition at line 686 of file Odepa_pi.cpp.

References RESEARCH_STATUS_COUNT.

int DepartmentArray::create_dept  
 

called only by read_file() return : <int> nationRecno = the recno. of the newly added nation

Definition at line 174 of file Odepta.cpp.

References MAX_DEPARTMENT.

Referenced by read_file().

void DepartmentArray::deinit  
 

Reimplemented from DynArray.

Definition at line 97 of file Odepta.cpp.

void DepartmentArray::del int    recNo
 

Definition at line 190 of file Odepta.cpp.

References department_count, is_deleted(), DynArrayB::linkout(), selected_recno, and DynArray::size().

void DepartmentArray::faculty_hiring  
 

Definition at line 390 of file Odepa_hi.cpp.

References FACULTY_RANK_LEVEL_COUNT.

int DepartmentArray::has_department char *    departmentName
 

Return whether this department array has the department whose name is passed as the parameter.

Definition at line 282 of file Odepta.cpp.

void DepartmentArray::init  
 

Definition at line 33 of file Odepta.cpp.

References MODE_DEPT_DEPARTMENTAL_ACADEMIC_STANDING, MODE_DEPT_EDUCATIONAL_QUALITY, MODE_DEPT_EDUCATIONAL_QUALITY2, MODE_DEPT_FACULTY_DIVERSITY_INDEX, MODE_DEPT_FACULTY_MORALE, MODE_DEPT_FACULTY_RESEARCH_PERFORMANCE, MODE_DEPT_MAIN, MODE_DEPT_RANK, and MODE_DEPT_STUDENT_MORALE.

void DepartmentArray::init_data  
 

Definition at line 117 of file Odepta.cpp.

References SchoolFacultyEx::active_research_dollars, average_research_dollars, FACULTY_RANK_LEVEL_COUNT, MAX_SCHOOL_EX_FOR_INIT_CONDITION, and SchoolEx::school_faculty_array_ex.

void DepartmentArray::init_research  
 

called once for each game

Definition at line 143 of file Ofac_rs.cpp.

References Department::faculty_array, Faculty::init_research(), FacultyArray::is_deleted(), and DynArray::size().

int DepartmentArray::is_deleted int    recNo
 

Definition at line 266 of file Odepta.cpp.

References Department::department_recno, DynArray::get_ptr(), and NULL.

Referenced by calc_course_pref(), calc_faculty_student_history(), and del().

void DepartmentArray::next_day  
 

Definition at line 222 of file Odepta.cpp.

References RESEARCH_STATUS_COUNT, research_y_history, shift_history, and update_history().

Department* DepartmentArray::operator[] int    departmentRecno [inline]
 

Definition at line 428 of file Odept.h.

References DynArray::get_ptr().

Referenced by calc_course_history(), and calc_course_pref().

void DepartmentArray::p_sort_performance  
 

Definition at line 472 of file Odepa_pi.cpp.

int DepartmentArray::read_file File   filePtr
 

Read a saved dynamic array from file, it must be saved with write_file()

<File*> readFile = the pointer to the writing file

Return : 1 - read successfully 0 - writing error

Reimplemented from DynArrayB.

Definition at line 65 of file OGFILE4.CPP.

References DynArray::add_blank(), Department::create_department_firm(), create_dept(), department_count, Department::department_recno, err_when, File::file_get_short(), File::file_read(), DynArray::get_ptr(), DynArray::go(), DynArrayB::linkout(), NULL, DynArrayB::packed_size(), DynArrayB::read_empty_room(), Department::read_file(), and DynArray::size().

void DepartmentArray::salary_setting  
 

refer to td 3.5 section 3

Definition at line 232 of file Odepa_hi.cpp.

References GENDER_ETHNIC_TYPE_COUNT, PL_FACULTY_SALARY_INCREASES, and S1_FACULTY_SALARY_INCREASES.

int DepartmentArray::salary_weight_input_2_multiplier char    weightInput [inline, static]
 

Definition at line 452 of file Odept.h.

References IF.

void DepartmentArray::update_history char    update_flag
 

Definition at line 141 of file Odepa_pi.cpp.

References FacultyArray::discretionary_hour_array, DISCRETIONARY_TYPE_COUNT_N_TOTAL, err_here, err_when, Department::faculty_array, FacultyArray::faculty_count, FACULTY_RANK_LEVEL_COUNT_N_TOTAL, GENDER_ETHNIC_TYPE_COUNT_N_TOTAL, MAX_STUDENT_LEVEL_N_TOTAL, MAX_TEACHING_METHOD_N_TOTAL, Department::p_educational_quality_history, Department::p_faculty_diversity_history, Department::p_faculty_morale_history, Department::p_faculty_research_history, Department::p_student_morale_history, FacultyArray::performance_research, FacultyArray::performance_scholarship, FacultyArray::performance_teaching, Department::regular_faculty_count, RESEARCH_STATUS_COUNT, S_PRESTIGE, shift_history, GeneralDepartment::student_array, StudentArray::student_count, FacultyArray::talent_research, FacultyArray::talent_scholarship, FacultyArray::talent_teaching, and FacultyArray::teaching_contact_hour.

Referenced by next_day().

int DepartmentArray::write_file File   filePtr
 

Write current dynamic array into file, read_file() can be used to retrieve it.

<File*> writeFile = the pointer to the writing file

Return : 1 - write successfully 0 - writing error

Reimplemented from DynArrayB.

Definition at line 21 of file OGFILE4.CPP.


Member Data Documentation

int DepartmentArray::admission_denied_count[MAX_TEACHING_METHOD_N_TOTAL]
 

Definition at line 541 of file Odept.h.

Referenced by calc_course_history().

int DepartmentArray::average_class_size[MAX_TEACHING_METHOD_N_TOTAL]
 

Definition at line 537 of file Odept.h.

Referenced by calc_course_history().

int DepartmentArray::average_research_dollars[FACULTY_RANK_LEVEL_COUNT]
 

Definition at line 503 of file Odept.h.

Referenced by init_data().

int DepartmentArray::class_section_count[MAX_TEACHING_METHOD_N_TOTAL]
 

Definition at line 535 of file Odept.h.

Referenced by calc_course_history().

int DepartmentArray::convention_student_count[MAX_TEACHING_METHOD_N_TOTAL]
 

Definition at line 536 of file Odept.h.

Referenced by calc_course_history().

char DepartmentArray::current_data_mode
 

Definition at line 398 of file Odept.h.

char DepartmentArray::current_pref_report_type
 

Definition at line 397 of file Odept.h.

char DepartmentArray::current_report_type
 

Definition at line 433 of file Odept.h.

char DepartmentArray::current_screen_mode
 

Definition at line 396 of file Odept.h.

int DepartmentArray::department_count
 

Definition at line 392 of file Odept.h.

Referenced by add(), calc_course_history(), del(), and read_file().

float DepartmentArray::discretionary_hour_array[DISCRETIONARY_TYPE_COUNT_N_TOTAL][HISTORY_TRIMESTER_COUNT]
 

Definition at line 498 of file Odept.h.

int DepartmentArray::experienced_class_size[HISTORY_TRIMESTER_COUNT]
 

Definition at line 546 of file Odept.h.

Referenced by calc_course_history().

int DepartmentArray::faculty_count_on_tenure_line
 

Definition at line 459 of file Odept.h.

int DepartmentArray::faculty_count_tenured
 

Definition at line 460 of file Odept.h.

int DepartmentArray::faculty_gender_history[GENDER_ETHNIC_TYPE_COUNT_N_TOTAL][HISTORY_YEAR_COUNT]
 

Definition at line 492 of file Odept.h.

Referenced by calc_faculty_student_history().

int DepartmentArray::faculty_level_history[FACULTY_RANK_LEVEL_COUNT_N_TOTAL][HISTORY_YEAR_COUNT]
 

Definition at line 491 of file Odept.h.

Referenced by calc_faculty_student_history().

int DepartmentArray::faculty_rank_in_research_talent
 

Definition at line 464 of file Odept.h.

int DepartmentArray::faculty_rank_in_scholarship_talent
 

Definition at line 463 of file Odept.h.

int DepartmentArray::faculty_rank_in_teaching_talent
 

Definition at line 462 of file Odept.h.

int DepartmentArray::failure_count[MAX_TEACHING_METHOD_N_TOTAL]
 

Definition at line 542 of file Odept.h.

Referenced by calc_course_history().

float DepartmentArray::gender_ethnic_equity_weight_input
 

Definition at line 449 of file Odept.h.

float DepartmentArray::k1con
 

Definition at line 455 of file Odept.h.

float DepartmentArray::k2con
 

Definition at line 456 of file Odept.h.

int DepartmentArray::last_selected_recno
 

Definition at line 395 of file Odept.h.

int DepartmentArray::normal_class_size[MAX_TEACHING_METHOD_N_TOTAL]
 

Definition at line 538 of file Odept.h.

Referenced by calc_course_history().

float DepartmentArray::p_academic_standing_history[HISTORY_YEAR_COUNT]
 

Definition at line 476 of file Odept.h.

int DepartmentArray::p_academic_standing_sort[MAX_DEPARTMENT]
 

Definition at line 483 of file Odept.h.

float DepartmentArray::p_educational_quality_history[HISTORY_TRIMESTER_COUNT]
 

Definition at line 475 of file Odept.h.

int DepartmentArray::p_educational_quality_sort[MAX_DEPARTMENT]
 

Definition at line 482 of file Odept.h.

float DepartmentArray::p_faculty_diversity_history[HISTORY_YEAR_COUNT]
 

Definition at line 480 of file Odept.h.

int DepartmentArray::p_faculty_diversity_sort[MAX_DEPARTMENT]
 

Definition at line 487 of file Odept.h.

float DepartmentArray::p_faculty_morale_history[HISTORY_MONTH_COUNT]
 

Definition at line 479 of file Odept.h.

int DepartmentArray::p_faculty_morale_sort[MAX_DEPARTMENT]
 

Definition at line 486 of file Odept.h.

float DepartmentArray::p_faculty_research_history[HISTORY_MONTH_COUNT]
 

Definition at line 478 of file Odept.h.

int DepartmentArray::p_faculty_research_sort[MAX_DEPARTMENT]
 

Definition at line 485 of file Odept.h.

float DepartmentArray::p_student_morale_history[HISTORY_TRIMESTER_COUNT]
 

Definition at line 477 of file Odept.h.

int DepartmentArray::p_student_morale_sort[MAX_DEPARTMENT]
 

Definition at line 484 of file Odept.h.

float DepartmentArray::performance_research[HISTORY_TRIMESTER_COUNT]
 

Definition at line 532 of file Odept.h.

float DepartmentArray::performance_scholarship[HISTORY_TRIMESTER_COUNT]
 

Definition at line 530 of file Odept.h.

float DepartmentArray::performance_teaching[HISTORY_TRIMESTER_COUNT]
 

Definition at line 529 of file Odept.h.

float DepartmentArray::rank_age_group_salary_increase_multiplier[MAX_RANK_AGE_GROUP]
 

Definition at line 444 of file Odept.h.

int DepartmentArray::regular_faculty_with_research[HISTORY_MONTH_COUNT]
 

Definition at line 520 of file Odept.h.

int DepartmentArray::research_direct_history[HISTORY_MONTH_COUNT]
 

Definition at line 517 of file Odept.h.

float DepartmentArray::research_m_history[RESEARCH_STATUS_COUNT][HISTORY_MONTH_COUNT]
 

Definition at line 510 of file Odept.h.

int DepartmentArray::research_total_history[HISTORY_MONTH_COUNT]
 

Definition at line 515 of file Odept.h.

float DepartmentArray::research_weight_input
 

Definition at line 448 of file Odept.h.

float DepartmentArray::research_y_history[RESEARCH_STATUS_COUNT][HISTORY_YEAR_COUNT]
 

Definition at line 512 of file Odept.h.

Referenced by next_day().

float DepartmentArray::scholarship_weight_input
 

Definition at line 447 of file Odept.h.

int DepartmentArray::selected_recno
 

Definition at line 394 of file Odept.h.

Referenced by add(), and del().

int DepartmentArray::size_deviation[MAX_TEACHING_METHOD_N_TOTAL]
 

Definition at line 540 of file Odept.h.

Referenced by calc_course_history().

int DepartmentArray::student_gender_history[GENDER_ETHNIC_TYPE_COUNT_N_TOTAL][HISTORY_YEAR_COUNT]
 

Definition at line 494 of file Odept.h.

Referenced by calc_faculty_student_history().

int DepartmentArray::student_level_history[MAX_STUDENT_LEVEL_N_TOTAL][HISTORY_YEAR_COUNT]
 

Definition at line 493 of file Odept.h.

Referenced by calc_faculty_student_history().

float DepartmentArray::talent_research[HISTORY_TRIMESTER_COUNT]
 

Definition at line 526 of file Odept.h.

float DepartmentArray::talent_scholarship[HISTORY_TRIMESTER_COUNT]
 

Definition at line 525 of file Odept.h.

float DepartmentArray::talent_teaching[HISTORY_TRIMESTER_COUNT]
 

Definition at line 524 of file Odept.h.

float DepartmentArray::teaching_contact_hour[HISTORY_TRIMESTER_COUNT]
 

Definition at line 497 of file Odept.h.

float DepartmentArray::teaching_weight_input
 

Definition at line 446 of file Odept.h.

int DepartmentArray::total_faculty_count
 

Definition at line 490 of file Odept.h.

Referenced by calc_faculty_student_history().

int DepartmentArray::total_student_count
 

Definition at line 489 of file Odept.h.

Referenced by calc_faculty_student_history().

float DepartmentArray::weight_research
 

Definition at line 440 of file Odept.h.

float DepartmentArray::weight_scholarship
 

Definition at line 439 of file Odept.h.

float DepartmentArray::weight_teaching
 

Definition at line 438 of file Odept.h.


The documentation for this class was generated from the following files:
Generated on Fri Aug 23 01:39:04 2002 for VirtualU by doxygen1.2.17