In this Cpp projects list, we will see how to build the ATTENDANCE MANAGEMENT SYSTEM project using C++ programming language. This project is control of student attendance. Admin can generate usernames and passwords for students and register them. Students may log in, indicate attendance for the same day, and view their attendance history.
FEATURES OF ATTENDANCE MANAGEMENT SYSTEM PROJECT
1.This project control the attendance of student.
2. Admin can generate username and password for student and register them.
3. Students may login and mark there attendance for the same day, and also view their attendance history.
4. This project written and compiled in C++ and g++ respectively.
IMPLEMENTATION
Step 1. Create a new Project in Dev C++
File > New > Source File or Ctrl + N |
Step 2. First of all we will include all the header file
#include |
Step 3. using namespace std:
The using namespace statement simply means that all things in the std namespace are available in the scope in which it is present, without the need to prefix them with std:.
Step 4. We have to create all these function which are mentioned below:
int adminView(); |
The code of adminView() function
After entering the username and password in admin we will this type of menu. which include some function like register a student,delete all student name registered, delete student by roll no. so on.
int adminView() cout<<"\n Enter you choice: "; switch(choice) if(goBack == 1) } return 0; |
The code of studentView() function
In student login, students will enter their username and password and mark their attendance and can also check attendance count.
int studentView() string username, password; cout<<"\n Enter username : "; cout<<"\n Enter password : "; int res = checkStudentCredentials(username, password); if(res == 0) int goBack = 0; cout<<"\n 1 Mark Attendance fo Today "; cout<<"\n Enter you choice: "; switch(choice) if(goBack == 1) |
The code of studentLogin() function
Student login is calling two function
1. studentView()
2. delay()
int studentLogin() |
The code for checkStudentCredentials(string userName, string password) function
To read or open a.dat file, you must first determine its type, and then convert it to make it easier to open. This check student is already exist or not.
int checkStudentCredentials(string username, string password) ifstream read; if (read) { if(recordFound == 0) |
The code of getAllStudentsbyRollNo() function
It shows all the student by their roll no.
int getAllStudentsbyRollNo() cout<<"\n Please any key to continue.."; return 0; |
The code of deleteAllStudents() function
It deletes the data of all student.
int deleteAllStudents() getchar(); getchar(); |
The code of deleteStudentbyRollno() function
This function will delete the particular student details by using their Roll no.
int deleteStudentbyRollno() cout<<"\n Please any key to continue.."; return 0; |
The code of checkListOfStudentsRegistered() function
It gives list of all registered student.
int checkListOfStudentRegistered() getchar(); |
The code of checkPresenseCountbyRollno() function
It Check presence count of any Student by Roll No.
int checkPresenseCountbyRollno() cout<<"\n Please any key to continue.." ; return 0; |
The code of getListOfStudentsWithTheirPresenseCount() function
It gives all Students with their presence count
int getListOfStudentsWithTheirPresenseCount() getchar(); |
The code of registerStudent() function
This function takes all detail of student and create student username and password and it also check that student is already exist or not.
int registerStudent() string name, username, password, rollno, address, father, mother; ofstream out; ofstream out1; cout<<"\n Student Registered Successfully !!"; |
The code of adminLogin() function
In this we enter admin username and password. then is call adminView() ,delay() functions.
int adminLogin() string username; cout<<"\n Enter username : "; if(username=="ADMIN" && password=="ADMIN@123") return 0; |
The code of markMyAttendance(string username) function
This function mark the attendance of student.
int markMyAttendance(string username) getchar(); return 0; Step 18. int countMyAttendance(string username); int countMyAttendance(string username) getchar();getchar(); return 0; |
The code of delay() function
It saves the record.
int delay() |
Step 5. Finally, we will code for main() function and run the project.
This is the very important function of every c++ program . And in this project this main function shows the main menu which include these following functions:
1. student login
2. admin login
3. exit
Remember: |
int main(int argc, char** argv) { } } |
Output
Main Screen
Admin Login Screen
Admin View Screen
Student Registration Screen
Registered Student Screen
Student Login Screen
Delete All Students Screen
Conclusion: In this article, we have covered how to build Attendance Management System Project using C++ programming language.
Article Contributed By :
|
|
|
|
5646 Views |