GitXplorerGitXplorer
j

MarketBasket

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
4c12aea8255e8ea800dab1dff28a72fc8187bcab

Create Product Model

jjoaoluizn committed 4 years ago
Unverified
4e8e595ea3c577125b2a35f1c451040069c18846

Initial Project Structure

jjoaoluizn committed 4 years ago
Unverified
779950a77cc89631faa5778f7a645134580b0c40

Update gitignore with autoimport from idea

jjoaoluizn committed 4 years ago
Unverified
0be320bb759dcae74b5ef8e6a8a192f699217fdb

Update Gitignore with jetbrains ignores

jjoaoluizn committed 4 years ago
Verified
97f7ac35017e2577f033062d72e064e0e8f63009

Initial commit

jjoaoluizn committed 4 years ago

README

The README file for this repository.

MarketBasket

A Java Market Basket Implementation with Taxes calculation.

Architecture

The following Architecture was thinking on acess logic through Business layer, were the Checkout.java is the Business Object, that acess components needed in order to achieve the Checkout.

These data would be passed to a superior layer that could be a Controller, or in that case, the Application.java itself.

Models contain entities that could be schema for database objects.

DTO represents the data transfer objects that are being used for intermediate data transfer operations between components.

Utils contains all utilitary classes that could be used along te project.

Tests folder follows the same architecture to unit test business logic.

📦src
 ┣ 📂main
 ┃ ┣ 📂java
 ┃ ┃ ┣ 📂core
 ┃ ┃ ┃ ┣ 📂business
 ┃ ┃ ┃ ┃ ┣ 📂checkout
 ┃ ┃ ┃ ┃ ┃ ┗ 📜TaxesCalculator.java
 ┃ ┃ ┃ ┃ ┗ 📜Checkout.java
 ┃ ┃ ┃ ┣ 📂dto
 ┃ ┃ ┃ ┃ ┣ 📜BuyOrder.java
 ┃ ┃ ┃ ┃ ┣ 📜Receipt.java
 ┃ ┃ ┃ ┃ ┣ 📜TaxedOrder.java
 ┃ ┃ ┃ ┃ ┗ 📜TaxedProduct.java
 ┃ ┃ ┃ ┣ 📂models
 ┃ ┃ ┃ ┃ ┣ 📂enums
 ┃ ┃ ┃ ┃ ┃ ┗ 📜ProductType.java
 ┃ ┃ ┃ ┃ ┗ 📜Product.java
 ┃ ┃ ┃ ┗ 📜Application.java
 ┃ ┃ ┗ 📂utils
 ┃ ┃ ┃ ┗ 📜MathUtils.java
 ┃ ┗ 📂resources
 ┗ 📂test
 ┃ ┣ 📂java
 ┃ ┃ ┣ 📂core
 ┃ ┃ ┃ ┗ 📂business
 ┃ ┃ ┃ ┃ ┣ 📂checkout
 ┃ ┃ ┃ ┃ ┃ ┗ 📜TaxesCalculatorTest.java
 ┃ ┃ ┃ ┃ ┗ 📜CheckoutTest.java
 ┃ ┃ ┗ 📂TestUtils
 ┃ ┃ ┃ ┗ 📜TestUtils.java
 ┃ ┗ 📂resources

How to Run

  • Run the Application.java main method.

How to Test

  • Run the following command on terminal: ./gradlew test
  • Or run through the IDE