0% found this document useful (0 votes)
4 views1 page

Java Attendance Management System

The document describes a Java class called AttendanceManagementSystem that uses a HashMap to store student attendance records with their ID as the key and a boolean value of present or absent. It has methods to mark attendance and check if a student is present.

Uploaded by

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

Java Attendance Management System

The document describes a Java class called AttendanceManagementSystem that uses a HashMap to store student attendance records with their ID as the key and a boolean value of present or absent. It has methods to mark attendance and check if a student is present.

Uploaded by

v8jtrzr6q8
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd

import [Link].

HashMap;
import [Link];

public class AttendanceManagementSystem {


private Map<String, Boolean> attendanceRecords;

public AttendanceManagementSystem() {
attendanceRecords = new HashMap<>();
}

public void markAttendance(String studentId, boolean present) {


[Link](studentId, present);
}

public boolean isStudentPresent(String studentId) {


return [Link](studentId, false);
}

public static void main(String[] args) {


AttendanceManagementSystem attendanceSystem = new
AttendanceManagementSystem();

// Mark attendance for students


[Link]("student1", true);
[Link]("student2", true);
[Link]("student3", false);

// Check if a student is present or absent


[Link]("Is student1 present? " +
[Link]("student1"));
[Link]("Is student4 present? " +
[Link]("student4"));
}
}

You might also like