Giter Site home page Giter Site logo

asap's Introduction

ASAP Courier Service

ASAP is a courier service system. Currently, offer criteria is using weight and distance criteria. This ASAP system provides extensibility to add our own offer criteria as well. This provides extensibility to create new offers as well.

Application functionalities:

  • Calculate total cost of a package and discount if any offerCode applied
  • Calculate estimated time of delivery of a package

Available Offer codes:

Currently, there are only 3 offer codes available. If applied offer code is other than these 3 then discount will be 0.

  • OFR001
  • OFR002
  • OFR003

Anyway, this application provides flexibility to add more offers as well.

Quick Start

Getting started with the ASAP courier service is easy. It is configured to run out of the box with minimal setup.

Step 1: Download Java (11 and above) for your platform

To use this application, you need a working installation of Java and Gradle.

The application was built using the Gradle plugin for IntelliJ IDEA IDE. The project build.gradle file is configured to let you run the application from within IntelliJ.

Step 2: Install Gradle

If you do not have the Gradle build system installed, install Gradle.

Step 3: Enable annotation processor

This application uses lombok project. So in order to run this application, please make sure annotation processor is enabled in your IDE.

Step 4: Download the ASAP Application source code

Next, clone the sample repository and install the project's dependencies.

From your shell or command line:

  • $ git clone https://github.com/lavanyak2020/ASAP.git
  • $ cd ASAP

Step 5: Run the Application

Run ASAPApplication which contains main method.

Running the Application

You are prompted for Inputs. Please provide all the inputs. Once you are done with inputs, you can find output in console.

Sample input:

Please enter Base delivery cost: 100

Enter No. of vehicles: 2

Enter Max Speed: 60

Enter Max Carriable weight: 200

No. of packages: 2

PackageID:P1
Weight(in kgs):50
Distance(in kms):10
offerCode:OFR001

PackageID:p2
Weight(in kgs):30
Distance(in kms):50
offerCode:OFR002

Sample Output:

PackageID: P1 Discount: 0.0 Rupees Total cost: 650.0 Rupees Estimated delivery time(in hours): 0.16666666666666666 Hours
PackageID: p2 Discount: 0.0 Rupees Total cost: 650.0 Rupees Estimated delivery time(in hours): 0.8333333333333334 Hours

asap's People

Contributors

lavanyak2020 avatar

Stargazers

saicharan avatar

Watchers

James Cloos avatar  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.