0% found this document useful (0 votes)
20 views14 pages

Cse PR

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views14 pages

Cse PR

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Green University of Bangladesh

Dept. of Computer Science and Engineering


Faculty of Science and Engineering
Semester: (Spring, Year:2023), B.Sc. in CSE (Day)

Project Report
Course Title: Data Structure Lab
Course Code: CSE 105
Section: DA

Lab Project Name: A PROJECT OF STUDENT MANAGEMENT SYSTEM.

Student Data
NAME: MD SAKIB HASAN EMON
Student ID: 222902026
Department of CSE (PC)
Green University of Bangladesh

Teachers Evolution
Teacher’s Name:
Submission Date:
Signature:

Marks:
Table of Contents

Chapter 1 Introduction....................................................................................................................................
1.1 Introduction...............................................................................................................................................
1.2 Design Goals/Objective............................................................................................................................

Chapter 2 Design/Development/Implementation of the Project..................................................................


2.1 Section (Choose the name of this section as appropriate with your project)............................................
2.2 Section (Choose the name of this section as appropriate with your project)..............................................

Chapter 3 Performance Evaluation................................................................................................................


3.1 Simulation Environment/ Simulation Procedure......................................................................................
3.2 Results and Discussions............................................................................................................................

Chapter 4 Conclusion......................................................................................................................................
4.1 Introduction...............................................................................................................................................
4.1 Practical Implications................................................................................................................................
4.2 Scope of Future Work...............................................................................................................................

References.........................................................................................................................................................

1.1 Introduction:
The Student Management System is a software application designed to streamline and
automate various administrative tasks related to student information in educational
institutions. It serves as a centralized platform to manage student records, academic
performance, attendance, and other relevant data. The system aims to improve
efficiency, organization, and communication within the institution, benefiting both
students and administrators.

1.2 Objective:
The objective of the STUDENT MANAGEMENT SYSTEM project is to create an
efficient and comprehensive system that streamlines the management of student-related
tasks in an educational institution. The system aims to automate processes such as
student enrollment, data entry, student details etc. By implementing this system, the
project seeks to enhance administrative productivity, improve data accuracy, and provide
a user-friendly interface for all stakeholders. The goal is to enhance the overall
efficiency and effectiveness of student management, leading to better student outcomes
and an enhanced educational experience for all parties involved.

2.1 Design/Development:
2.2 Implementation of the Project:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_STUDENTS 100


#define MAX_NAME_LENGTH 50
#define MAX_DEPARTMENT_LENGTH 50
#define PASSWORD "admin123"

typedef struct {
char name[MAX_NAME_LENGTH];
char phoneNumber[MAX_NAME_LENGTH];
char department[MAX_DEPARTMENT_LENGTH];
int id;
} Student;

Student students[MAX_STUDENTS];
int studentCount = 0;
void insertStudent();
void deleteStudent();
void searchStudent();
void viewStudents();
void sortStudents();
void sortByName();
void sortByDepartment();
void sortByID();
void showTotalStudents();
void searchByDepartment();
void searchByID();
int validatePassword();

int main() {
int choice;
int attempts = 3;
int loggedIn = 0;

while (1) {
printf("------------------------------------------\n");
printf("\tStudent Management System\n\n");
printf("\t@Designed by Sakib\n");
printf("-----------------------------------------\n\n");

if (!loggedIn) {
if (attempts <= 0) {
printf("Too many incorrect attempts. Exiting...\
n");
exit(0);
}

if (!validatePassword()) {
attempts--;
continue;
}
loggedIn = 1;
}

printf("\t\t1. Insert\n");
printf("\t\t2. Delete\n");
printf("\t\t3. Search\n");
printf("\t\t4. View\n");
printf("\t\t5. Exit\n");
printf("\t\tEnter your choice: ");
scanf("%d", &choice);

switch (choice) {
case 1:
insertStudent();
break;
case 2:
deleteStudent();
break;
case 3:
searchStudent();
break;
case 4:
viewStudents();
break;
case 5:
exit(0);
default:
printf("Invalid choice! Please try again.\n");
}
}

return 0;
}

void insertStudent() {
if (studentCount == MAX_STUDENTS) {
printf("Cannot add more students. The database is full.\
n");
return;
}

Student newStudent;
printf("Enter student name: ");
scanf("%s", newStudent.name);
printf("Enter phone number: ");
scanf("%s", newStudent.phoneNumber);
printf("Enter department: ");
scanf("%s", newStudent.department);
printf("Enter ID: ");
scanf("%d", &newStudent.id);

students[studentCount++] = newStudent;
printf("Student inserted successfully.\n");
}

void deleteStudent() {
int id, i;
printf("Enter the ID of the student to delete: ");
scanf("%d", &id);

for (i = 0; i < studentCount; i++) {


if (students[i].id == id) {
break;
}
}

if (i == studentCount) {
printf("Student with ID %d not found.\n", id);
} else {
for (; i < studentCount - 1; i++) {
students[i] = students[i + 1];
}
studentCount--;
printf("Student with ID %d deleted successfully.\n",
id);
}
}

void searchStudent() {
int id, i;
printf("Enter the ID of the student to search: ");
scanf("%d", &id);

for (i = 0; i < studentCount; i++) {


if (students[i].id == id) {
printf("Student found!\n");
printf("Name: %s\n", students[i].name);
printf("Phone Number: %s\n",
students[i].phoneNumber);
printf("Department: %s\n", students[i].department);
printf("ID: %d\n", students[i].id);
return;
}
}

printf("Student with ID %d not found.\n", id);


}

void viewStudents() {
int choice;
printf("View Options:\n");
printf("1. Sort by Name\n");
printf("2. Sort by Department\n");
printf("3. Sort by ID\n");
printf("Enter your choice: ");
scanf("%d", &choice);

switch (choice) {
case 1:
sortByName();
break;
case 2:
sortByDepartment();
break;
case 3:
sortByID();
break;
default:
printf("Invalid choice! Displaying unsorted list.\
n");
}

printf("Name\t\tPhone Number\t\tDepartment\t\tID\n");
for (int i = 0; i < studentCount; i++) {
printf("%s\t\t%s\t\t%s\t\t\t%d\n", students[i].name,
students[i].phoneNumber, students[i].department,
students[i].id);
}
}

void sortByName() {
for (int i = 0; i < studentCount - 1; i++) {
for (int j = 0; j < studentCount - i - 1; j++) {
if (strcmp(students[j].name, students[j + 1].name) >
0) {
// Swap students
Student temp = students[j];
students[j] = students[j + 1];
students[j + 1] = temp;
}
}
}
}

void sortByDepartment() {
for (int i = 0; i < studentCount - 1; i++) {
int minIndex = i;
for (int j = i + 1; j < studentCount; j++) {
if (strcmp(students[j].department,
students[minIndex].department) < 0) {
minIndex = j;
}
}
Student temp = students[i];
students[i] = students[minIndex];
students[minIndex] = temp;
}
}
void sortByID() {
for (int i = 1; i < studentCount; i++) {
Student key = students[i];
int j = i - 1;
while (j >= 0 && students[j].id > key.id) {
students[j + 1] = students[j];
j--;
}
students[j + 1] = key;
}
}

void showTotalStudents() {
printf("Total number of students: %d\n", studentCount);
}
void searchByDepartment() {
char department[MAX_DEPARTMENT_LENGTH];
printf("Enter the department to search for: ");
scanf("%s", department);

printf("Students in department %s:\n", department);


for (int i = 0; i < studentCount; i++) {
if (strcmp(students[i].department, department) == 0) {
printf("Name: %s\n", students[i].name);
printf("Phone Number: %s\n",
students[i].phoneNumber);
printf("Department: %s\n", students[i].department);
printf("ID: %d\n", students[i].id);
}
}
}
void searchByID() {
int id;
printf("Enter the ID to search for: ");
scanf("%d", &id);

for (int i = 0; i < studentCount; i++) {


if (students[i].id == id) {
printf("Student found!\n");
printf("Name: %s\n", students[i].name);
printf("Phone Number: %s\n",
students[i].phoneNumber);
printf("Department: %s\n", students[i].department);
printf("ID: %d\n", students[i].id);
return;
}
}

printf("Student with ID %d not found.\n", id);


}

int validatePassword() {
char password[MAX_NAME_LENGTH];
printf("Enter the password: ");
scanf("%s", password);
if (strcmp(password, PASSWORD) == 0) {
return 1;
}

printf("Wrong password. Try again.\n");


return 0;
}

3.1Simulation Environment/ Simulation Procedure:

To simulate the student management system project in C, follow these steps:

1. Open a C compiler or an integrated development environment (IDE) that supports C


programming.

2. Create a new C file and copy the code of the student management system into the file.

3. Compile the code using the C compiler or IDE. Ensure that there are no syntax errors or
warnings.

4. Once the code is successfully compiled, run the program.

5. The program will display a menu of options for managing student records.

6. Enter the corresponding number for the operation you want to perform:

- 1: Insert a new student record. Provide the name, roll number, and marks of the student as
prompted.
- 2: Delete a student record. Enter the roll number of the student to be deleted.
- 3: Search for a student record. Enter the id number of the student you want to find.
- 4: View all student records.
- 5: Exit the program.

7. Based on your choice, the program will execute the corresponding operation and display
the result or perform the desired action.

8. After completing the selected operation, the program will display the menu again,
allowing you to choose another option or exit the program.

9. Repeat the process as needed to manage student records.

10. Once you are done, choose the "6" option to exit the program.

This simulation procedure will allow you to interact with the student management system
project in C and perform operations such as inserting, deleting, searching, viewing, and
sorting student records.

3.2Results and Discussions:


The student management system project in C provides a simple and efficient solution for
managing student records. The project includes features like insertion, deletion, searching,
viewing, and sorting of student records based on roll number.

By implementing this system, users can easily insert new student records, delete existing
records, search for specific students by their roll numbers, view all student records, and sort
the records by roll number. The program efficiently handles these operations by using data
structures and algorithms in C.

The project offers a user-friendly interface that allows users to interact with the system
seamlessly. It provides real-time feedback and notifications regarding the success or failure
of operations, ensuring a smooth user experience.

The sorting functionality enables users to arrange the student records in ascending order
based on roll numbers, facilitating easy access to information. This feature improves the
system's usability and efficiency, especially when dealing with large datasets.

Overall, the student management system project in C is a valuable tool for educational
institutions and organizations to effectively manage and organize student records,
simplifying administrative tasks and enhancing productivity.

4 .1 Conclusion:
In conclusion, the student management system project in C provides a basic yet effective
way to manage student records. The program allows users to insert, delete, search, and view
student details. It also includes the functionality to sort the records by roll number. With the
ability to handle multiple student entries, the system offers convenient management and
organization of student data. It serves as a useful tool for educational institutions or any
scenario that requires the management of student information. The project demonstrates the
fundamental concepts of data manipulation and user interaction in C programming,
contributing to a well-rounded understanding of the language.

4.2 Practical Implications:


A student management system implemented in C has several practical implications in
educational institutions. It enables efficient record keeping, organization, and retrieval of
student data. The system allows administrators to easily insert, delete, and search for student
records, simplifying administrative tasks. The ability to view all student records provides a
comprehensive overview of the student body. Additionally, the sorting functionality
facilitates the arrangement of student records based on specific criteria, such as roll number
or name, improving accessibility and analysis. Overall, this project streamlines student
management processes, enhances data management, and contributes to effective decision-
making in educational institutions.

4.3 Scope of Future Work:


Some possible areas for future work on the student management system project in C could
include implementing additional functionality such as updating student records,
incorporating data persistence using file handling, adding password protection for secure
access, designing a user-friendly graphical interface, integrating database management
systems, implementing advanced search and filter options, generating reports or statistics,
and enhancing error handling and validation mechanisms to improve the system's robustness.

References:
1. Bala Guruswamy, E. (2019). Programming in ANSI C. McGraw Hill Education.
2. Kernighan, B. W., & Ritchie, D. M. (1988). The C Programming Language (2nd Edition).
Prentice Hall.
3. Gottschling, P. (2015). Discovering Modern C++: An Intensive Course for Scientists,
Engineers, and Programmers. Addison-Wesley Professional.
4. "C Programming Language" - Wikipedia. [Online]. Available:
https://en.wikipedia.org/wiki/C_(programming_language)
5. "C Standard Library" - Wikipedia. [Online]. Available:
https://en.wikipedia.org/wiki/C_standard_library
6. Google.

You might also like