0% found this document useful (0 votes)
8 views4 pages

OOP Mini Project 03

The document outlines a Mini Project for an Attendance Management System for teachers at a university, detailing the problem statement and class structure. It includes classes such as Person, TimeRecord, Attendance, Teacher, Admin, Department, and ReportGenerator, each with specific purposes, inheritance models, and member functions. The system aims to automate attendance tracking while utilizing various programming concepts like inheritance and constructors.

Uploaded by

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

OOP Mini Project 03

The document outlines a Mini Project for an Attendance Management System for teachers at a university, detailing the problem statement and class structure. It includes classes such as Person, TimeRecord, Attendance, Teacher, Admin, Department, and ReportGenerator, each with specific purposes, inheritance models, and member functions. The system aims to automate attendance tracking while utilizing various programming concepts like inheritance and constructors.

Uploaded by

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

Department of Computer Science – Mini Project 03

🧾 Project Title:

Attendance Management System of Teachers

🧾 Problem Statement / Project Scenario:

A university wants to automate the attendance tracking of its faculty members. Each teacher's in-
time, out-time, total hours, late-ins, early-gos, short hours, and extra hours should be tracked.
Additionally, different types of staff (permanent, visiting, administrative) have different
attendance policies. The system must efficiently use inheritance to reuse code, and incorporate
constructors, destructors, objects, copy constructors, and various inheritance models (single,
multiple, multilevel, hierarchical, hybrid) with different access specifiers.

1. Class: Person

 Purpose: Serves as the base class for all human entities in the system, such as teachers and
admins.
 Inheritance: Base class (does not inherit from any class).
 Access Specifiers & Data Members:
o protected:
 string name: Name of the person.
 int id: Unique ID of the person.
 Member Functions:
o Person(): Default constructor.
o Person(string n, int i): Parameterized constructor.
o void getPersonalInfo(): Takes personal information from the user.
o void displayPersonalInfo(): Displays stored personal information.
o ~Person(): Destructor to clean up resources.

2. Class: TimeRecord

 Purpose: Maintains check-in and check-out times of a person.


 Inheritance: Independent class (not part of the hierarchy).
 Access Specifiers & Data Members:
o protected:
 string inTime: Time when the teacher checks in.
 string outTime: Time when the teacher checks out.
 Member Functions:
o TimeRecord(): Default constructor.
o void setInTime(string time): Set check-in time.
o void setOutTime(string time): Set check-out time.

pg. 1
Department of Computer Science – Mini Project 03

o string getInTime(): Retrieve check-in time.


o string getOutTime(): Retrieve check-out time.

3. Class: Attendance

 Purpose: Records attendance details including late arrival, early leave, short hours, and
excess hours.
 Inheritance: Publicly inherits from TimeRecord.
 Access Specifiers & Data Members:
o protected:
 int lateInMinutes
 int earlyGoMinutes
 int shortHours
 int excessHours
 Member Functions:
o Attendance(): Default constructor.
o void calculateLateIn(): Computes how late the teacher checked in.
o void calculateEarlyGo(): Computes early departure.
o void calculateShortAndExcessHours(): Calculates and differentiates between
shortfall and excess hours.
o void displayAttendanceReport(): Displays the full attendance details.

4. Class: Teacher

 Purpose: Represents a teacher in the institution and tracks attendance.


 Inheritance: Publicly inherits from both Person and Attendance (Multiple Inheritance).
 Access Specifiers & Data Members:
o private:
 string subject: Subject the teacher teaches.
 string department: Department the teacher belongs to.
 Member Functions:
o Teacher(): Default constructor.
o Teacher(string n, int i, string sub, string dept): Parameterized constructor.
o void getTeacherDetails(): Input teacher-specific details.
o void displayTeacherInfo(): Display full teacher profile and attendance.

5. Class: Admin

 Purpose: Administrator who can add, remove, or view teacher data and reports.
 Inheritance: Publicly inherits from Person (Single Inheritance).

pg. 2
Department of Computer Science – Mini Project 03

 Access Specifiers & Data Members:


o private:
 string role: Role of admin (e.g., Head, Supervisor).
 Member Functions:
o Admin(): Default constructor.
o Admin(string n, int i, string r): Parameterized constructor.
o void manageTeachers(): Placeholder for managing teacher records.
o void viewReports(): View attendance summaries.

6. Class: Department

 Purpose: Handles groupings of teachers by departments.


 Inheritance: Protected Inheritance from Teacher (Hierarchical Inheritance).
 Access Specifiers & Data Members:
o private:
 string departmentName
 int numberOfTeachers
 Member Functions:
o Department(): Default constructor.
o void setDepartmentInfo(string name, int count): Set department info.
o void displayDepartmentInfo(): Display department summary.

7. Class: ReportGenerator
Purpose: Generates full attendance summaries and analytics. It compiles and analyzes teacher
attendance records, highlighting key metrics such as late-ins, early-outs, short hours, and excess
hours.
Inheritance: Publicly inherits from Teacher (can also be considered hybrid if further extended).
Access Specifiers & Data Members:
o private:
 Teacher t1, t2, t3; — Stores a fixed number of teacher objects for reporting.
 int teacherCount; — Maintains how many teachers are being considered.
 string reportDate; — Stores the date of the report generation.

Member Functions:
o ReportGenerator() — Constructor to initialize report generator and default teacher values.
o void inputTeachers() — Takes input for teachers' attendance and personal data.
o void generateDailyReport() — Prints attendance information for the current day for all
teachers.
o void generateMonthlySummary() — Summarizes and displays cumulative attendance
statistics over a month.

pg. 3
Department of Computer Science – Mini Project 03

o void generateUserSelectedDateSummary() — Summarizes and displays cumulative


attendance statistics between selected range of dates.

o ~ReportGenerator() — Destructor to clean up any used resources or reset values.

pg. 4

You might also like