UNIT - 1 Application
UNIT - 1 Application
APPLICATION
Case study develop a system to manage student records, including personal information,
academic performance and attendance. Enrich with appropriate algorithm, , neat flow chart,
pseudo code
**User Roles**:
- **Administrator**: Manages student records, including adding, updating, deleting, and
viewing records.
- **Teacher**: Updates academic performance and attendance.
- **Student**: Views personal academic performance and attendance.
**Data Components**:
- **Personal Information**: Name, Student ID, Date of Birth, Contact Information, Address.
- **Academic Performance**: Courses, Grades, GPA.
- **Attendance**: Dates, Presence/Absence, Percentage.
**Backend**:
- **Data Structures**: Arrays and structures to store and manage student records.
- **Logic Layer**: Functions to handle data processing, including algorithms for GPA
calculation and attendance tracking.
**GPA Calculation**:
- **Input**: Array of courses with grades.
- **Output**: GPA.
- **Formula**: \( GPA = \frac{\sum (Grade \times Credit Hours)}{\sum Credit Hours} \)
**Flowchart Description**:
```plaintext
+----------------------------------+
| Start |
+----------------------------------+
|
v
+----------------------------------+
| Login: Select Role |
+----------------------------------+
|
v
+----------------------------------+ +----------------------------------+ +-------------------
---------------+
| Admin Actions | | Teacher Actions | | Student Actions
|
| - Add/Update/View/Delete Student |<----------| - Update Grades & Attendance |<----------|
- View Performance & Attendance |
| Records | | | | |
+----------------------------------+ +----------------------------------+ +-------------------
---------------+
| | |
v v v
+----------------------------------+ +----------------------------------+ +-------------------
---------------+
| Calculate GPA & Attendance | | Store Data in Data Structures | | End
|
+----------------------------------+ +----------------------------------+ +-------------------
---------------+
|
v
+----------------------------------+
| Store Data in Data Structures |
+----------------------------------+
|
v
+----------------------------------+
| End |
+----------------------------------+
```
// Structure Definitions
typedef struct {
char course_name[50];
int grade;
int credit_hours;
} Course;
typedef struct {
char name[50];
char student_id[15];
char dob[15];
char contact_info[50];
char address[100];
Course courses[MAX_COURSES];
int num_courses;
int total_classes;
int attended_classes;
} Student;
// Main Function
int main() {
int choice;
do {
printf("1. Add Student\n");
printf("2. Update Grades\n");
printf("3. Update Attendance\n");
printf("4. View Student\n");
printf("5. Exit\n");
printf("Enter your choice: ");
scanf("%d", &choice);
switch(choice) {
case 1:
add_student();
break;
case 2:
update_grades();
break;
case 3:
update_attendance();
break;
case 4:
view_student();
break;
case 5:
printf("Exiting the system...\n");
break;
default:
printf("Invalid choice. Try again.\n");
}
} while(choice != 5);
return 0;
}
```