Skip to content

ganpat-patel-012/java-school-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Java School Data App

A layered Java application for managing school contacts and student data, built following OOP principles and the DAO (Data Access Object) pattern. Data is persisted in an embedded H2 database and can also be loaded from CSV files. Includes a full suite of JUnit tests covering OOP, JDBC, and business logic layers.

Features

  • Load Contacts and Students from CSV files
  • Persist and query data using JDBC with H2 embedded database
  • Full CRUD operations via DAO layer (ContactDAO, StudentDAO)
  • Business logic service layer (ContactBLService, SchoolDataService)
  • Projection support (StudentContactProjection)
  • 9 test classes organised by layer: OOP, JDBC, and Business Logic

Tech Stack

Component Technology
Language Java
Database H2 (embedded, in-memory/file)
DB Access JDBC
Testing JUnit
Build IntelliJ IDEA project (.iml)
Dependency H2 JAR (lib/h2-2.3.232.jar)

Project Structure

java-school-app/
├── src/
│   ├── main/fr/epita/fund/
│   │   ├── datamodel/
│   │   │   ├── Contact.java                     # Contact entity
│   │   │   ├── Student.java                     # Student entity
│   │   │   └── projections/
│   │   │       └── StudentContactProjection.java # Joined projection
│   │   ├── services/
│   │   │   ├── ContactDAO.java                  # JDBC CRUD for contacts
│   │   │   ├── StudentDAO.java                  # JDBC CRUD for students
│   │   │   ├── ContactCSVReader.java             # Parse contacts from CSV
│   │   │   ├── StudentCSVReader.java             # Parse students from CSV
│   │   │   ├── ContactBLService.java             # Business logic layer
│   │   │   ├── SchoolDataService.java            # Orchestration service
│   │   │   └── DatabaseConnection.java           # JDBC connection manager
│   │   └── launcher/
│   │       └── Main.java                         # Entry point
│   └── test/fr/epita/fund/tests/
│       ├── TestOOP1.java                         # OOP model tests
│       ├── TestOOP2.java
│       ├── TestJDB1.java                         # JDBC layer tests
│       ├── TestJDB2.java
│       ├── TestJDB3.java
│       ├── TestJDB4.java
│       ├── TestJDB5.java
│       ├── TestBLI1.java                         # Business logic tests
│       ├── TestBLI2.java
│       └── TestBLI3.java
├── resources/
│   ├── contacts.csv                              # Sample contact data
│   ├── students.csv                              # Sample student data
│   ├── create-contacts.sql                       # DDL for contacts table
│   └── create-students.sql                       # DDL for students table
└── lib/
    └── h2-2.3.232.jar                            # H2 embedded database

Data Models

Contact

email, first_name, last_name, address, city, country, birthdate

Student

(inherits or relates to Contact) — see Student.java for full fields

Getting Started

Prerequisites

  • Java 11+
  • IntelliJ IDEA (recommended) or any Java IDE

Setup in IntelliJ

  1. Open the java-school-app folder as a project
  2. Make sure lib/h2-2.3.232.jar is added to the module classpath
  3. Run individual test classes under src/test/ to verify functionality

Running Tests

Open any test class (e.g., TestJDB1.java) and run it directly. Tests are self-contained and use the H2 in-memory database — no external database setup needed.

Architecture

CSV Files / SQL DDL
       ↓
ContactCSVReader / StudentCSVReader  (parsing layer)
       ↓
ContactDAO / StudentDAO              (JDBC persistence layer)
       ↓
ContactBLService / SchoolDataService (business logic layer)
       ↓
Main / Tests                         (entry points)

Author

Ganpat Patel EPITA MS — Semester 2 | Object-Oriented Analysis, UML & Java

About

School management app in Java using DAO pattern, JDBC, H2 database and JUnit tests

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages