Skip to content

ojayballer/Attendance-Manager-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Student Attendance Manager (Java + Swing + MySQL)

This is a Java-based Student Attendance Management System built with Swing for the GUI and MySQL as the database backend. It allows you to add, update, delete, and view student attendance records for multiple subjects.


πŸ“‹ Features

  • βœ… Add student attendance data (Name, Matric Number, Subject, Total Classes, Classes Attended)
  • ✏️ Edit existing records
  • ❌ Delete students by Matric Number
  • πŸ“Š View records in a scrollable JTable
  • πŸ“ˆ Calculates total attendance percentage automatically
  • πŸ”— Connected to a MySQL database using JDBC
  • πŸ’» User-friendly interface using Java Swing

🧱 Project Structure

Attendance-Manager-Java/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Attendance.java      # Main GUI and logic
β”‚   β”œβ”€β”€ attest.java          # Launches the GUI
β”‚   └── Database (MySQL DB)  # Contains attendance table

πŸ—ƒοΈ MySQL Database Schema

Database: intern

Table: attendance

CREATE TABLE attendance (
    matric_number VARCHAR(20) PRIMARY KEY,
    NAME VARCHAR(100),
    SUBJECT VARCHAR(20),
    TOTAL_CLASSES INT,
    CLASSES_ATTENDED INT,
    TOTAL_ATTENDANCE VARCHAR(10)
);

πŸš€ How to Run

1. Set up the Database

  1. Open MySQL
  2. Create database: intern
  3. Run the SQL script above to create the attendance table.

2. Update JDBC connection in Attendance.java

// Replace with your actual MySQL credentials
Connection conn = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/intern", "root", "password");

3. Compile and Run

You can compile and run using IntelliJ, Eclipse, or the terminal:

javac Attendance.java attest.java
java attest

πŸ“Έ GUI Preview

The application uses Java Swing and displays input fields on the left and the student table on the right. Clicking a student row populates the fields for editing.


About

A student attendance management system built with Java Swing and MySQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages