Subsgredient is a Java-based application for discovering and substituting ingredients quickly and efficiently. It uses a Red-Black Tree (with multi-key nodes) for optimized data lookup and insertion, powered by a CSV dataset of 2,000+ ingredients.
- Project Overview
- Features
- Technologies & Tools
- Setup & Installation
- Usage
- Testing
- Project Structure
- Contributors
- License
This project allows users to:
- Insert and store large numbers of ingredients.
- Retrieve potential substitutions or related ingredient data.
- Enjoy fast search times due to an underlying Red-Black Tree implementation.
You’ll find additional logs and the out/ directory included in this repository for reference and demonstration.
- Ingredient Data Management: Load ingredients from
ingredients.csvand manage them in a Red-Black Tree. - Multiple Duplicates Handling: Stores duplicates within a single node (using a KeyList structure).
- Frontend & Backend Separation: Clear distinction between the user interface (
FrontendDev) and the core logic (BackendImplementation). - Extensive Testing: Includes JUnit-based test suites for both frontend and backend functionalities.
- Java (11+)
- JUnit 5 for testing
- Makefile for builds and running tests
- CSV for ingredient datasets
- Git for version control
- Clone the repository:
git clone https://github.com/SrujayReddy/Subsgredient-App.git
cd Subsgredient-App-
Ensure Java 11+ is installed.
If you plan to run tests locally, you may need thejunit5.jarin your parent folder or configured in your IDE. -
Review the files to confirm presence of
.javafiles,Makefile,ingredients.csv, etc.
You can compile and run using the Makefile or standard javac/java commands.
- Compile & run the backend:
make runThis compiles BackendImplementation.java and runs it.
Alternatively, compile everything manually:
javac *.java
java BackendImplementation(Adjust class name if you want to run the frontend instead.)
We have two main sets of tests: BackendDeveloperTests and FrontendTests.
- Backend Tests:
make runBDTestsCompiles and runs all JUnit 5 tests for the backend.
- Frontend Tests:
make runFDTestsCompiles and runs all JUnit 5 tests for the frontend.
Subsgredient/
├── backend/
│ ├── BackendImplementation.java
│ ├── BackendInterface.java
│ ├── BinarySearchTree.java
│ ├── RedBlackTree.java
│ ├── SortedCollectionInterface.java
│ ├── Ingredient.java
│ ├── IngredientInterface.java
│ ├── IngredientPlaceholder.java
│ ├── IterableMultiKeyRBT.java
│ ├── KeyList.java
│ └── KeyListInterface.java
├── frontend/
│ ├── FrontendDev.java
│ ├── FrontendInterface.java
│ └── TextUITester.java
├── tests/
│ ├── BackendDeveloperTests.java
│ └── FrontendTests.java
├── data/
│ └── ingredients.csv
├── log
├── out/
├── Makefile
├── .gitignore
└── README.md
out/andlogare included for demonstration logs, class outputs, etc.
- Srujay Reddy Jakkidi (Backend)
- Katie (Frontend)
This project was developed as part of the CS 537: Introduction to Operating Systems course at the University of Wisconsin–Madison. It is shared strictly for educational and learning purposes only.
Important Notes:
- Redistribution or reuse of this code for academic submissions is prohibited and may violate academic integrity policies.
- The project is licensed under the MIT License. Any usage outside academic purposes must include proper attribution.