Git Product home page Git Product logo

bootcamp-shipment-code-kata's Introduction

Shipment Code Kata

We have a shipment application that decides what the shipment size should be on basket. There are products on a basket, and each has a shipment size such as SMALL, MEDIUM, LARGE and X_LARGE.
The rule is that you should determine the basket shipment size depending on how many products you have in which shipment size on your basket.

Rules

  • You have a threshold value while determining the basket shipment size, it's three, which means if all the products of three or more have the same shipment size, then you should specify the basket size as one upper shipment size.
  • If the count of the products on the basket is less than three, you should determine the basket shipment size as the largest one among them.
  • If the count of the products on the basket is more than three and you don't have three of the same shipment size, you should determine the basket shipment size as the largest one among them.
  • If the count of the products on the basket is three or more and all of them are X_LARGE, you should determine the basket shipment size as X_LARGE.

Shipment Sizes

Types
SMALL
MEDIUM
LARGE
X_LARGE

Examples

Product Product Product Product Product Basket
SMALL SMALL SMALL
SMALL SMALL SMALL MEDIUM
SMALL SMALL MEDIUM MEDIUM
SMALL SMALL LARGE LARGE
SMALL SMALL SMALL SMALL MEDIUM
SMALL SMALL SMALL LARGE MEDIUM
SMALL SMALL SMALL SMALL SMALL MEDIUM
SMALL SMALL MEDIUM MEDIUM LARGE LARGE
SMALL MEDIUM MEDIUM
SMALL MEDIUM MEDIUM MEDIUM
MEDIUM MEDIUM MEDIUM
MEDIUM MEDIUM MEDIUM LARGE
MEDIUM MEDIUM MEDIUM MEDIUM LARGE
MEDIUM LARGE LARGE
MEDIUM MEDIUM LARGE LARGE
MEDIUM LARGE LARGE LARGE
X_LARGE X_LARGE X_LARGE X_LARGE
LARGE LARGE LARGE X_LARGE

Expectation

We have written all the test cases above in the project. We would like you to write just the production code.
Pay attention to the code is understandable and expandable easily while writing it, good luck coders ๐Ÿ˜Š

Tech Stack

  • Java 11
  • Gradle
  • jUnit5 and Mockito

bootcamp-shipment-code-kata's People

Contributors

atacanymc avatar yusufcakal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.