Skip to content

Miki13-web/Introduction_to_Java_Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Management System

A comprehensive Java desktop application for managing students, groups, and academic records with a modern GUI interface.

Overview

This project demonstrates professional Java development practices including object-oriented programming, design patterns, modern Java features, and comprehensive testing. The system provides a complete solution for educational institutions to manage student data, group assignments, grades, and generate statistical reports.

Features

Core Functionality

  • Student Management: Add, edit, delete students with comprehensive personal and academic data
  • Group Management: Create and manage student groups with drag-and-drop assignment
  • Grade Tracking: Record and calculate student averages with validation
  • Statistical Analysis: Generate group statistics, top students reports, and performance metrics
  • CSV Import/Export: Seamless data import/export with validation and error handling

Advanced Features

  • Modern GUI: Professional interface with FlatLaf styling and tabbed navigation
  • Drag & Drop: Intuitive student-to-group assignment via drag-and-drop
  • Real-time Statistics: Dynamic updates of averages and rankings
  • Data Validation: Comprehensive input validation with user-friendly error messages
  • Search & Filter: Real-time student search with multi-field filtering
  • Single Source of Truth: Centralized data management with thread-safe operations

Architecture

Design Patterns

  • Singleton Pattern: DataService ensures single source of truth for data
  • Repository Pattern: Centralized data access and persistence
  • MVC Pattern: Clear separation of Model, View, and Controller
  • Observer Pattern: Automatic UI updates when data changes
  • Factory Pattern: Dialog creation and component initialization

Technology Stack

  • Java 14+: Modern Java features including switch expressions and var
  • Swing: Mature GUI framework with custom styling
  • FlatLaf: Modern look and feel for enhanced user experience
  • Log4j2: Comprehensive logging framework
  • JUnit 5: Professional unit testing framework
  • Maven: Dependency management and build automation

Project Structure

src/
├── main/java/i2jp/
│   ├── app/
│   │   └── MainGui.java           # Application entry point
│   ├── gui/
│   │   ├── MainFrame.java         # Main application window
│   │   ├── dialogs/               # Custom dialog components
│   │   └── models/                # Table models for GUI
│   ├── service/
│   │   └── DataService.java       # Central data management
│   ├── oop/
│   │   ├── Person.java             # Base entity class
│   │   ├── Student.java           # Student entity
│   │   ├── Group.java             # Group entity
│   │   └── GroupRegistry.java      # Group assignment registry
│   └── log/                       # Logging demonstrations
└── test/java/i2jp/service/
    └── DataServiceTest.java        # Comprehensive unit tests

Getting Started

Prerequisites

  • Java 14 or higher
  • Maven 3.6 or higher
  • IDE (IntelliJ IDEA, Eclipse, or VS Code)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd Laby
  2. Build the project

    mvn clean compile
  3. Run the application

    mvn exec:java -Dexec.mainClass="i2jp.app.MainGui"
  4. Run tests

    mvn test

Data Format

Student CSV Format

ID;IndexNumber;FirstName;LastName;Gender;BirthDate;[Grades]
1;S001;John;Doe;MALE;01.01.2002;[4.5,5.0,4.0]
2;S002;Jane;Smith;FEMALE;15.03.2003;[5.0,4.5,5.0]

Group CSV Format

GroupName;Description;[StudentIDs]
ITE_WIMiIP;Computer Science;[1,2,3]
ITE_Management;Business Studies;[2,3]

Testing

The project includes comprehensive unit tests demonstrating:

  • Test-Driven Development: TDD principles and practices
  • Assertion Techniques: Various assertion methods and edge case testing
  • Mock Testing: Isolation of components for focused testing
  • Test Coverage: High coverage of critical business logic

Running Tests

# Run all tests
mvn test

# Run with coverage report
mvn test jacoco:report

# Run specific test class
mvn test -Dtest=DataServiceTest

User Interface

Main Features

  • Tabbed Navigation: Organized interface with Students, Groups, and Statistics tabs
  • Real-time Search: Instant filtering of student records
  • Drag & Drop: Visual student assignment to groups
  • Context Menus: Right-click operations for quick actions
  • Status Bar: Real-time feedback and system information

Statistics Dashboard

  • Global Overview: Total students and system-wide averages
  • Group Analytics: Per-group statistics including mean and median
  • Top Performers: Automatic ranking of best-performing students
  • Visual Reports: Clear presentation of academic performance data

Technical Highlights

Modern Java Features

  • Switch Expressions: Clean, type-safe conditional logic
  • Local Variable Type Inference: var keyword for cleaner code
  • Stream API: Functional programming for data processing
  • Optional Class: Null-safe programming practices
  • Lambda Expressions: Concise functional programming

Design Principles

  • SOLID Principles: Single responsibility, open/closed, Liskov substitution, interface segregation, dependency inversion
  • DRY Principle: Don't Repeat Yourself - eliminate code duplication
  • Encapsulation: Proper data hiding and controlled access
  • Immutability: Immutable data structures where appropriate

Performance Optimizations

  • Thread-Safe Collections: ConcurrentHashMap and synchronized collections
  • Lazy Loading: Efficient data loading and caching
  • Memory Management: Proper resource cleanup and memory optimization
  • Efficient Algorithms: Optimized sorting and searching implementations

Learning Outcomes

This project serves as an excellent learning resource for:

Java Development

  • Object-Oriented Programming: Inheritance, polymorphism, encapsulation
  • Design Patterns: Practical implementation of common patterns
  • Modern Java: Latest language features and best practices
  • GUI Development: Swing programming with modern styling

Software Engineering

  • Testing Strategies: Unit testing, TDD, and test coverage
  • Build Systems: Maven configuration and dependency management
  • Code Quality: Clean code principles and maintainability
  • Architecture: Layered architecture and separation of concerns

Professional Practices

  • Version Control: Git workflow and project organization
  • Documentation: Comprehensive README and code comments
  • Error Handling: Robust exception handling and user feedback
  • Logging: Professional logging strategies and debugging

Contributing

This project is designed as a learning resource and demonstration of professional Java development practices. While contributions are welcome, the primary focus is on educational value and code clarity.

Development Guidelines

  • Follow Java naming conventions and code style
  • Write comprehensive unit tests for new features
  • Update documentation for API changes
  • Ensure backward compatibility when possible

License

This project is provided as an educational resource. Please refer to the license file for usage terms.

Acknowledgments

  • FlatLaf Team: For the modern look and feel library
  • Apache Log4j Team: For the comprehensive logging framework
  • JUnit Team: For the excellent testing framework
  • Maven Community: For the build automation tool

Note: This project was developed as part of an academic course to demonstrate advanced Java programming concepts and professional software development practices. It serves as both a functional application and a learning resource for Java developers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages