Skip to content

aniprogramer/Student-Result-Management-System---Mini-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Result Management System (SRMS)

A Java Swing application for managing students, courses, marks, and generating report cards. Built with MVC + DAO architecture, styled with FlatLaf, and backed by MySQL via JDBC prepared statements.

Overview

SRMS provides CRUD screens for core academic entities and a Report Card view that computes SGPA per semester and overall CGPA. Tables include search/filter bars and sensible column widths. The UI uses a modern FlatLaf theme with a clean main menu and optimized forms.

Prerequisites

Install and have the following ready before running the application:

  1. Java Development Kit (JDK) 17 or later
    • Verify: java -version should show 17.x or higher.
    • Ensure JAVA_HOME is set (optional but recommended).
  2. Maven 3.8+ (CLI)
    • Verify: mvn -v prints Maven version and Java home.
  3. MySQL Server 8.x running locally (or accessible remotely)
    • Verify: mysql --version.
    • Create and seed the database using initialize_student_result_database.sql (see Initialize Database section).
  4. MySQL credentials available (e.g., user root, password root).
  5. Internet access (first run) so Maven can download dependencies (FlatLaf, MySQL Connector/J).
  6. Git (optional) if you plan to clone or contribute.
  7. Fonts (optional aesthetic enhancement): Rubik Dirt (headings), Ovo (body).

Optional / Nice-to-have:

  • A modern IDE (IntelliJ IDEA, VS Code with Java extensions, Eclipse).
  • Printer configured (for printing report cards).
  • CSV viewer (Excel, LibreOffice, etc.) for exported report data.

If running behind a proxy, configure Maven proxy settings in ~/.m2/settings.xml to allow dependency downloads.

Quick Verification (PowerShell)

java -version
mvn -v
mysql --version

All commands should succeed without errors before proceeding.

Installing Prerequisites (Windows Follow-Along)

If you are missing prerequisites, follow these guided steps (one clear method per tool). Use an Administrator PowerShell only when modifying system PATH.

1. Install JDK 17+

  1. Go to https://adoptium.net/temurin/releases/?version=17 and download the Windows x64 MSI installer.
  2. Run the installer, accept defaults.
  3. After installation open a new PowerShell window and verify:
    java -version
    Output should show version 17.x.
  4. Set JAVA_HOME (if not automatically set):
    $jdk=(Get-ChildItem "C:\Program Files" | Where-Object {$_.Name -like "*Temurin*"} | Sort-Object LastWriteTime -Descending | Select-Object -First 1).FullName
    [Environment]::SetEnvironmentVariable('JAVA_HOME', $jdk, 'Machine')
    $env:Path += ";$jdk\bin"
    java -version

2. Install Maven

  1. Download the binary ZIP from https://maven.apache.org/download.cgi (e.g. apache-maven-3.x.x-bin.zip).
  2. Extract to C:\Tools\maven (create folder if needed).
  3. Add C:\Tools\maven\bin to PATH:
    [Environment]::SetEnvironmentVariable('Path', $Env:Path + ';C:\Tools\maven\bin','Machine')
  4. Open a new PowerShell and verify:
    mvn -v

3. Install MySQL Server & Workbench

  1. Download MySQL Installer from https://dev.mysql.com/downloads/installer/ (choose the larger full installer if bandwidth allows).
  2. Run installer → at setup type choose "Developer Default".
  3. During configuration set a root password (remember it for -Ddb.pass=).
  4. Finish and launch MySQL Workbench to confirm connection. Service runs as MySQL80.
  5. (Optional PATH) Add MySQL bin (e.g. C:\Program Files\MySQL\MySQL Server 8.0\bin) to PATH for CLI.
  6. Import schema & seed data:
    mysql -u root -p < "initialize_student_result_database.sql"
  7. Verify database objects exist via Workbench or:
    mysql -u root -p -e "SHOW DATABASES;"

4. Install Git

  1. Download from https://git-scm.com/download/win.
  2. Run installer; accept defaults (Enable Git from command prompt).
  3. Verify:
    git --version

5. Install Fonts (Optional UI Enhancement)

  1. Visit https://fonts.google.com/ and search for "Rubik Dirt" and "Ovo".
  2. Download each family (Download family button).
  3. Extract ZIPs; right‑click each .ttf → Install for all users.
  4. Restart the application for font detection.

6. First Build & Dependency Download

Run a compile to let Maven fetch dependencies:

mvn -Ddb.user=root -Ddb.pass=root compile

If you use a proxy, configure %USERPROFILE%\.m2\settings.xml with <proxies> before this step.

7. Run Application

mvn exec:java "-Ddb.user=root" "-Ddb.pass=root"

Common Issues & Fixes

  • Java version wrong: Open a new shell; ensure only one JDK path precedes others in PATH.
  • Maven not recognized: Confirm bin path added; reopen PowerShell.
  • MySQL auth failure: Re-enter password; reset via MySQL Workbench if forgotten.
  • Port conflict (3306): Change port during MySQL configuration or stop conflicting service.
  • Dependency download failure: Check internet access or proxy; retry mvn compile.

Features

  • CRUD Forms: Students, Departments, Faculty, Courses, Marks, Results.
  • Marks Entry: Auto-calculates totals and grade on save.
  • Report Cards: SGPA per semester and overall CGPA; CSV export and printing.
  • Search & Filter: Live row filtering in all tables.
  • UI Polish: FlatLaf theming, accent color, rounded components, improved layouts.
  • Keyboard/Mouse Friendly: Focused forms and responsive tables.

Tech Stack

  • Language: Java 17+
  • GUI: Swing + FlatLaf
  • Database: MySQL (Connector/J)
  • Build: Maven (exec-maven-plugin)
  • Architecture: MVC + DAO with JDBC prepared statements

Project Structure

  • src/main/java/model: POJOs (Student, Course, Marks, etc.)
  • src/main/java/dao: DAOs for CRUD and queries (StudentDAO, MarksDAO ...)
  • src/main/java/ui: Swing forms and dialogs (MainMenu, ReportCardForm, etc.)
  • src/main/java/util: DBConnection that reads DB settings from JVM properties
  • src/main/java/Main.java: Entry point, FlatLaf setup and app launch

Database Configuration

SRMS reads DB settings from JVM system properties:

  • db.url (e.g. jdbc:mysql://localhost:3306/college_db)
  • db.user (e.g. root)
  • db.pass (e.g. root)

Ensure your MySQL instance has the required schema and tables. Seed some students and marks to see the Report Card in action.

Initialize Database

Use the provided initialize_student_result_database.sql to create the database, tables, and seed data.

Option A — PowerShell (mysql CLI):

# If mysql is on PATH
mysql -u root -p < "initialize_student_result_database.sql"

# Or specify full path to mysql.exe (typical install path)
& "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe" -u root -p < "initialize_student_result_database.sql"

# Non-interactive (password inline). Use with caution.
mysql -u root -proot < "initialize_student_result_database.sql"

Option B — MySQL Workbench:

  • Open MySQL Workbench and connect to your server.
  • File → Open SQL Script… → select initialize_student_result_database.sql.
  • Click the lightning bolt (Execute) to run the script.
  • Confirm the database and tables are created.

Build & Run

Run from PowerShell (Windows). Pass DB properties either before the Maven goal (preferred) or, if after the goal, wrap them in quotes.

Preferred (properties before goal):

mvn -Ddb.url="jdbc:mysql://localhost:3306/college_db" -Ddb.user="root" -Ddb.pass="root" exec:java

Alternate (properties quoted after goal):

mvn exec:java "-Ddb.url=jdbc:mysql://localhost:3306/college_db" "-Ddb.user=root" "-Ddb.pass=root"

If your exec-maven-plugin requires explicit main class:

mvn -Ddb.url="jdbc:mysql://localhost:3306/college_db" -Ddb.user="root" -Ddb.pass="root" exec:java -Dexec.mainClass=Main

Clean build:

mvn clean package

Final run command used in this project:

mvn exec:java "-Ddb.user=root" "-Ddb.pass=root"

Usage Tips

  • Use the Reports menu to open ReportCardForm.
  • If a student shows no marks, a hint with a button will open MarksForm to add them.
  • Export report data with the CSV button or print directly.

Fonts

For the intended look and feel:

  • Headings: Install the "Rubik Dirt" font.
  • Body text: Install the "Ovo" font.

On Windows:

  1. Download the fonts from Google Fonts (Rubik Dirt, Ovo).
  2. Double-click each .ttf and click Install.
  3. Restart the app to apply fonts.

The app falls back gracefully if fonts are not installed.

Troubleshooting

  • No DB connection: Verify db.url, db.user, db.pass and that MySQL is running.
  • Maven properties ignored: Ensure properties are placed before the goal or quoted if after.
  • Empty report: Add marks for the selected student via MarksForm.

Roadmap

  • PDF export of report cards
  • Per-semester filters and transcript view
  • Enhanced validation and error dialogs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages