GitXplorerGitXplorer
j

MarketBasket

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
11018a7088877a3c0d2f0ea8fc3765613dffd7bf

Add multiple itens support on tax calculation

jjoaoluizn committed 4 years ago
Verified
8664d45d0cd5f9cb2adf5abdc55e3157b2710135

Merge pull request #1 from joaoluizn/tax-calculator

jjoaoluizn committed 4 years ago
Unverified
aa30040b3c5214e329928383a9b9dd0f5d6908f1

Review Tax Calculator Patch#2

jjoaoluizn committed 4 years ago
Unverified
e8e561e47f24d0065d1c0e35a3a486d4c42edc85

Review Tax Calculator Patch#1

jjoaoluizn committed 4 years ago
Unverified
af38ee2189fc098ae3ce940e981a0bf629ffa237

Create tax calculator component

jjoaoluizn committed 4 years ago
Unverified
5c028f7ad4a75a2d56be8476ce316fc173dfd7ed

Remove .gradle from repository

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