Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. /*
  2. * faculty.h - header for faculty.c
  3. #ifndef _FACULTY_H
  4. #define _FACULTY_H
  5.  
  6. #include <errno.h>
  7. #include <limits.h>
  8. #include <math.h>
  9. #include <stdalign.h>
  10. #include <stdarg.h>
  11. #include <stdbool.h>
  12. #include <stddef.h>
  13. #include <stdint.h>
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <stdnoreturn.h>
  17. #include <strings.h>
  18. #include <unistd.h>
  19.  
  20. #define FACULTY_NUM 4096
  21. #define STUDENT_NUM 4096
  22. #define TEACHER_NUM 4096
  23. #define CLASSES_NUM 4096
  24.  
  25. enum stdn_grades {
  26. STDN_ATTENDACE, STDN_READING,
  27. STDN_LEVEL, STDN_WRITING,
  28. STDN_PARTICAPATION, STDN_IQ,
  29. STDN_CLEANLINESS, STDN_LEADERSHIP,
  30. STDN_OTHER,
  31. /* used for array sizing only */
  32. _STDN_SENTINEL,
  33. };
  34. enum tchr_grades {
  35. TCHR_ATTENDACE, TCHR_TEACHING,
  36. TCHR_PREPARATION, TCHR_INTERACTION,
  37. TCHR_TECHSKILL, TCHR_TECHUSE,
  38. TCHR_DEMEANOR, TCHR_LEADERSHIP,
  39. TCHR_OTHER,
  40. /* used for array sizing only */
  41. _TCHR_SENTINEL,
  42. };
  43. enum gender {
  44. MALE, FEMALE,
  45. };
  46. enum clss_levels {
  47. KG1, KG2, KG3,
  48. };
  49.  
  50. /* main structures */
  51. struct _student;
  52. struct _teacher;
  53. struct _class;
  54. /* complete faculty */
  55. struct _faculty;
  56.  
  57. /*
  58. * 1. Register all information related to students like:
  59. * name, age, gender, address, telephone no, and fees's payment.
  60. * (Register for 10 students at least).
  61. *
  62. * 5. Register all info related to student's assessment: like attendace_level,Reading
  63. * Level, Writing Level, Particapation Level,IQ_result, cleaning_skills, leadership_skills
  64. * and other notes.
  65. */
  66. struct _student {
  67. char *id, *ed_level, *uni, *spec_addr;
  68. enum gender sex;
  69. struct {
  70. unsigned area_code, number;
  71. } phone;
  72. struct {
  73. unsigned yr, mon, day;
  74. } dob;
  75. unsigned stdn_grades[_STDN_SENTINEL];
  76. };
  77.  
  78. /*
  79. * 2. Register all info related to teachers like: name, Date of Birth, Gender,
  80. * educational-level, University, Specialist address, telephone no.
  81. *
  82. * 4. Register all info related to teacher assessment like: attendance, teaching
  83. * skills, preparation for class, good interaction with students, using technology
  84. * in teaching, and other notes.
  85. */
  86. struct _teacher {
  87. char *id, *ed_level, *uni, *spec_addr;
  88. enum gender sex;
  89. struct {
  90. unsigned area_code, number;
  91. } phone;
  92. struct {
  93. unsigned yr, mon, day;
  94. } dob;
  95. unsigned tchr_grades[_TCHR_SENTINEL];
  96. };
  97.  
  98. /*
  99. * 3. Register all info related to class: each class should have level which can
  100. * be: kg1, kg2, kg3: each class has a teacher, location and number of students.
  101. */
  102. struct _class {
  103. char *id, *location;
  104. enum clss_levels level;
  105. /* always one teacher */
  106. unsigned tchr_idx;
  107. /* array of indexes into student table */
  108. unsigned stdn_idx[STUDENT_NUM];
  109. };
  110.  
  111. struct _faculty {
  112. struct _student students[STUDENT_NUM];
  113. struct _teacher teachers[TEACHER_NUM];
  114. struct _class classes[CLASSES_NUM];
  115. } faculty[FACULTY_NUM];
  116.  
  117. /*
  118. * 6. The system users are:
  119. *
  120. * · Administrator: has username and password and can do the following:
  121. * o add, modify, delete any of the data objects above (deletion must fill the
  122. * data with any arbitrary symbol like &, *, or!)
  123. * o search for students or teachers by name
  124. * o print the assessment’s report of any teacher or student.
  125. * o Print the payment info of any student.
  126. */
  127.  
  128. int dummy(void);
  129.  
  130. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement