Micro-project OOP
Micro-project OOP
The primary aim of developing an Attendance Management System using C++ is to create
an efficient software solution that facilitates the tracking and management of student
attendance in educational institutions. The system should support functionalities like:
2. Proposed Methodology
The methodology used to develop the Attendance Management System follows a systematic
approach:
2. System Design:
Designing the architecture of the system, including class structures like Attendance,
FileOperations and the flow of the application. Defining the input-output
requirements and deciding on how attendance data would be stored and displayed.
3. Implementation:
Testing the system by marking and retrieving attendance for various dates. Ensuring
that data is saved correctly in files and is retrievable accurately.
5. Report Compilation:
Structuring the information into a report format, including a description of the design,
the code implementation, resources used, and the results obtained.
SSWP/IF3K/2024-25 1 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
3. Action plan
SSWP/IF3K/2024-25 2 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
The system is developed using C++ and incorporates several fundamental programming
concepts:
ii. File Handling: Attendance records are stored in a text file using file streams
(ofstream).
iii. Input/Output Handling: It employs cin and cout to take input and display output,
iv. Sound Alerts: The Beep() function from the windows.h library is used to sound an
SSWP/IF3K/2024-25 3 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
#include <iostream>
#include <fstream>
#include <windows.h>
using namespace std;
class Attendance
{
public:
int day, month, year, strength, absent, result, y;
float percentPresent, percentAbsent;
void percentage() {
percentPresent = (result * 100.0) / y;
percentAbsent = (absent * 100.0) / y;
}
void display()
{
cout << "Date: " << day << "/" << month << "/" << year << endl;
cout << "Total strength of the class: " << y << endl;
cout << "Total present students: " << result << endl;
cout << "Total absent students: " << absent << endl;
cout << "Percentage of present students: " << percentPresent << "%" << endl;
cout << "Percentage of absent students: " << percentAbsent << "%" << endl;
}
};
class Input : public Attendance
{
public:
int p, i;
void get()
SSWP/IF3K/2024-25 4 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
{
cout << "Enter date to mark attendance: " << endl;
cout << "Day: ";
cin >> day;
cout << "Month: ";
cin >> month;
cout << "Year: ";
cin >> year;
y = 0;
cout << "Enter strength of the class: ";
cin >> y;
result = 0;
for (i = 1; i <= y; i++) {
cout << "Roll number " << i << " is Present/Absent (1 for Present, 0 for Absent): ";
cin >> p;
Beep(1000, 300);
result = result + p;
}
absent = y - result;
percentage();
}
};
int main()
{
ofstream o;
o.open("Untitled.txt", ios::app);
int choice, target, size = 0, targetMonth, targetYear;
Input in[100];
do
{
SSWP/IF3K/2024-25 5 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
SSWP/IF3K/2024-25 6 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
break;
}
}
break;
case 3:
cout << "Exiting." << endl;
break;
default:
cout << "Invalid choice!" << endl;
break;
}
} while (choice != 3);
o.close();
return 0;
}
SSWP/IF3K/2024-25 7 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
SSWP/IF3K/2024-25 8 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
SSWP/IF3K/2024-25 9 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
SSWP/IF3K/2024-25 10 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
8. Advantages
i. Efficiency: The system provides a fast and automated method for marking attendance
and generating reports, reducing the need for manual record-keeping.
ii. Object-Oriented Design: By using C++ and its object-oriented principles, the code is
modular, easy to maintain, and allows for scalability in the future.
iii. User-Friendly: The system is designed with a simple text-based interface, making it
accessible for non-technical users to mark attendance.
iv. Data Storage: The attendance data is stored in a file for future reference, allowing for
easy retrieval and review when needed.
v. Time-Saving: It significantly reduces manual efforts in marking attendance and
calculating percentages, which can be automated through this system
9. Disadvantages
SSWP/IF3K/2024-25 11 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
Display menu
1. Mark Attendance
2. View Attendance
3. Exit
View Mark
Attendance Attendance
Exit
SSWP/IF3K/2024-25 12 of 13
Sub: Object Oriented programming using C++ (312303) Develop a Attendance Management System
11. Conclusion
In this report, developing an Attendance Management System using C++ offers an effective
solution for tracking and managing student attendance in educational institutions.
12. Reference
https://www.geeksforgeeks.org/c-plus-plus/
https://www.w3schools.com/cpp/
SSWP/IF3K/2024-25 13 of 13