Giter VIP home page Giter VIP logo

simple-exchange's Introduction

Simple Exchange

This is a simple exchange verifier for a small exchange that supports only one feature, the limit order.

To run the application, you can use the following command:

./gradlew build

Once the application is built, you can run it by using the following command:

java -jar build/libs/simple-exchange-1.0-SNAPSHOT.jar

The application will read the input from the standard input and print the output to the standard output.

To run the unit tests, you can use the following command:

./gradlew test

Here are some examples of how to use the application:

cat src/main/resources/test1.txt | java -jar build/libs/simple-exchange-1.0-SNAPSHOT.jar 
     50,000     99 |    100         500
     25,500     98 |    100      10,000
                   |    103         100
                   |    105      20,000
cat src/main/resources/test2.txt | java -jar build/libs/simple-exchange-1.0-SNAPSHOT.jar 
trade 10006,10001,100,500
trade 10006,10002,100,10000
trade 10006,10004,103,100
trade 10006,10005,105,5400
     50,000     99 |    105      14,600
     25,500     98 |                   

And here's how to get MD5 of the output

cat src/main/resources/test1.txt | java -jar build/libs/simple-exchange-1.0-SNAPSHOT.jar | md5sum
8ff13aad3e61429bfb5ce0857e846567 -
cat src/main/resources/test2.txt | java -jar build/libs/simple-exchange-1.0-SNAPSHOT.jar | md5sum
ce8e7e5ab26ab5a7db6b7d30759cf02e -

simple-exchange's People

Contributors

a37h avatar

Watchers

 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.