Java/Gradle project for the Pyramid Problem. Includes data models, a naïve solver to be corrected, and a space for implementing an optimized solution with unit tests.
- Java 21
- Gradle
All classes are in com.ncr.test.pyramid and its subpackages.
com.ncr.test.pyramid
Contains main classes for running OurProgram (naïve solver) and YourProgram (optimized solver).
data: Data model classes and factory classesimpl: Implementation of interfaces
solver: Solution classes for the given tasksutils: Utility classes (helper functions, nothing critical for the assignment)
- Tests mirror the structure of the main project.
NaivePyramidSolverTest: Task 2 unit testsYourSolverTest: Task 3 unit tests
- Task 1: Update
build.gradleandsettings.gradlefor JDK 21. - Task 2: Fix
com.ncr.test.pyramid.solver.impl.NaivePyramidSolver(recursive solution). - Task 3: Implement optimized solution in
com.ncr.test.pyramid.solver.impl.YourSolver.
# Run Naive solver
./gradlew runNaiveSolver
# Run Optimized solver
./gradlew runYourSolver