This project provides a structured system for managing donations, library services, and events. Built using a layered architecture, it organizes core functionalities across packages including Controller, MODEL, DBUtil, DTO, and View. Testing is implemented using JUnit, and the database is connected via MySQL.
- README.md: This documentation file, providing an overview of the project.
- build.xml: Apache Ant build script, automating build and deployment processes.
- manifest.mf: Defines manifest attributes for creating a JAR file.
- libs: Contains external dependencies:
junit-4.13.2-javadoc.jar: Documentation for the JUnit framework used for unit testing.mysql-connector-j-8.3.0.jar: MySQL Connector library for handling database connections.
- nbproject: NetBeans configuration files, including:
build-impl.xml: Internal build configuration file.project.properties: Project-specific properties.project.xml: General project metadata.
-
src: Contains the main source code organized by modules:
Controller: Manages donation and library services logic.MODEL: Implements the Data Access Object (DAO) pattern, with sub-packages for:DAO: Data access layer classes, handling database CRUD operations.Patterns: Implements common design patterns:decorator: Classes for enhancing donations with specific features.factory: Factory classes for event creation.singleton: Singleton pattern for database connections.
DBUtil: Contains utilities for managing database connectivity.DTO: Data Transfer Objects that represent data structures within the project.View: Handles the project’s view-related classes, like command-line displays.constatns: Configuration files, e.g.,constants.properties.
-
out: Contains the compiled classes, matching the
srcstructure for easy navigation. -
test: Directory for unit tests, including:
generalTest: General tests for main classes.patterns: Tests for implemented design patterns.
- Java: JDK 8 or higher.
- MySQL: Database server for data persistence.
- Apache Ant: For running the build script.
- JUnit: Included in
libsfor running unit tests.
The database design for this project is maintained and visualized on DB Schema. For a full database schema and to modify relationships, refer to our schema on dbdiagram.io.
- Use the latest
SQLfile uploaded to the main branch of the project repository for the most up-to-date schema. - Do not use automatically generated SQL exports from dbdiagram.io; always refer to the SQL file on the main branch to avoid inconsistencies.
- Ensure that any modifications to the database structure are saved and updated on the main branch.
The class diagram provides an overview of the project's structure, showcasing relationships between key classes and their interactions. It visualizes the organization of main components like the Controller, MODEL, DTO, and View, as well as pattern implementations including the decorator, factory, and singleton patterns.
For an in-depth look at the class relationships and design patterns, refer to the Class Diagram created on draw.io.
- Clone the repository.
- Ensure the MySQL Connector (e.g.,
mysql-connector-j-8.3.0.jar) is available in thelibsdirectory. - Update
constants.propertiesinsrc/constatnswith the database configuration:jdbc.url=jdbc:mysql://localhost:3307/sdp_database jdbc.username=YOUR_USERNAME jdbc.password=YOUR_PASSWORD