data/· managed by dataManager
Data files
Each entity type lives in its own text file, one record per line, fields separated by | and lists by commas. The columns below are taken from the load and save methods.
|list separator ,missing file → empty listplain-text passwordsHow files connect#
Student · 7+ fields per line
students.txt#
One student per line. The last column lists enrolled course codes. Read by loadStudents(), written by saveStudents().
Sara Khalid|2200000001|Student1234|sara.k@uni.example|0500000101|North Residence|15|CS102,MATH201 Noura Saleh|2200000002|Noura12345|noura.s@uni.example|0500000102|West Campus|12|CS102,PHYS101 Faisal Omar|2200000003|Faisal1234|faisal.o@uni.example|0500000103|East Gate|18|ENG101,PHYS101
| # | Field | Java type | How it loads |
|---|---|---|---|
| 0 | name | String | parts[0] |
| 1 | id | String | parts[1], must be unique |
| 2 | password | String | parts[2], stored as plain text |
| 3 | email | String | parts[3] |
| 4 | phoneNumber | String | parts[4] |
| 5 | address | String | parts[5] |
| 6 | creditLimit | int | Integer.parseInt(parts[6]) |
| 7 | enrolledCourses | List<Course> | parts[7] split on commas → getCourseByCode() |
enrolledCourses→courses.txtby code
Instructor · 6+ fields per line
instructors.txt#
Profile fields only. Courses point at instructors, not the other way round. Read by loadInstructors(), written by saveInstructors().
Lina Haddad|4000000001|Teacher1234|lina.h@uni.example|0500000201|Faculty Block A Omar Faris|4000000002|Teacher5678|omar.f@uni.example|0500000202|Faculty Block B
| # | Field | Java type | How it loads |
|---|---|---|---|
| 0 | name | String | parts[0] |
| 1 | id | String | parts[1], must be unique |
| 2 | password | String | parts[2] |
| 3 | email | String | parts[3] |
| 4 | phoneNumber | String | parts[4] |
| 5 | address | String | parts[5] |
Administrator · 6+ fields per line
administrators.txt#
Same layout as instructors. The default admin is added at start-up if its ID is not already here. Read by loadAdministrators(), written by saveAdministrators().
Registrar Office|1000000001|Registrar2026|registrar@uni.example|0500000301|Admin Building
| # | Field | Java type | How it loads |
|---|---|---|---|
| 0 | name | String | parts[0] |
| 1 | id | String | parts[1], must be unique |
| 2 | password | String | parts[2] |
| 3 | email | String | parts[3] |
| 4 | phoneNumber | String | parts[4] |
| 5 | address | String | parts[5] |
Course · 8+ fields per line
courses.txt#
Empty schedule, description or instructor columns load as null. Read by loadCourses(), written by saveCourses().
Programming II|CS102|Sun/Tue 10:00|Object-oriented programming in Java|Open|4000000001|30|3|2200000001,2200000002 Discrete Mathematics|MATH201|Mon/Wed 12:00|Logic, sets and proofs|Open|4000000002|25|3|2200000001 Data Structures|CS210|Sun/Tue 13:00|Lists, trees and graphs|Open|4000000001|20|4| Technical Writing|ENG101|Thu 09:00|Reports, memos and presentations|Closed|4000000002|20|2|2200000003 Physics I|PHYS101|Mon/Wed 08:00||Open||2|4|2200000002,2200000003
| # | Field | Java type | How it loads |
|---|---|---|---|
| 0 | courseName | String | parts[0] |
| 1 | courseCode | String | parts[1], must be unique |
| 2 | schedule | String | parts[2], empty → null |
| 3 | description | String | parts[3], empty → null |
| 4 | enrollmentStatus | EnrollmentStatusEnum | valueOf(parts[4]): Open or Closed |
| 5 | instructor | Instructor | parts[5] → getInstructorById(), empty → null |
| 6 | capacity | int | Integer.parseInt(parts[6]) |
| 7 | creditHours | int | Integer.parseInt(parts[7]) |
| 8 | enrolledStudents | List<Student> | parts[8] split on commas → getStudentById() |
instructor→instructors.txtby idenrolledStudents→students.txtby id
Assessment · 5+ fields per line
assessments.txt#
One grade per line, keyed by student, course and exam type. Read by loadAssessments(), written by saveAssessments().
2200000001|CS102|Quiz_1|88.0|Quiz_1 2200000001|CS102|Midterm_1|91.5|Midterm_1 2200000002|CS102|Quiz_1|76.0|Quiz_1 2200000001|MATH201|Quiz_1|69.0|Quiz_1 2200000003|ENG101|Project|94.0|Project
| # | Field | Java type | How it loads |
|---|---|---|---|
| 0 | studentId | String | parts[0] |
| 1 | courseCode | String | parts[1] |
| 2 | examType | ExamType | valueOf(parts[2]) |
| 3 | score | double | Double.parseDouble(parts[3]) |
| 4 | assessmentName | String | parts[4], the exam type's name when graded in the app |
studentId→students.txtby idcourseCode→courses.txtby code