We use Apache Maven for our program, which follows a standard directory structure. The main-directory is for source code related to the application itself. The test-directory is for tests (Testing).
(Example picture of a Apache Maven standard directory structure)
We are also using a Model-View-Controller (MVC) structure for our main source code. This has allowed for the separation of the application’s business logic and display into three separate layers. This made it easier to group similar classes together and reduced the complexity of the entire code structure. In addition, it enforced looser coupling between the three layers, making them more independent, and improved code cohesion, as methods were made reusable.
(Picture showing our MVC-structure)
data
Here we organized our code into different packaged by the classes that are more associated with one-another. We sorted it into three directories: Budget, Economics and recipes.
-
As it name suggests, Budget is where our Budget-related classes are located, and in addition Savings-classes since GeneralBudget (our Budget-class) uses savings (not implemented into Frontend yet however).
-
Economics is for storing classes that are related to Income and Expense.
-
recipes are for storing classes that are related to the food part of the program.
(Picture showing how our data-directory is organized)
resources - budgets, Economics and recipes
These directories are where we store information on income, expenses, ingredients, and budgets (Persistence).
resources - images
This directory is where we have our different images we use in our application.
Test
For our Test-directory we followed a principle of naming our packages the same as for our data-directory, and the classes the same, but with "Test" at the end.