Commit c8a9c8c2 authored by Rohit Prasad's avatar Rohit Prasad

Add info about compiling and java version

parent 49ff2b43
...@@ -5,6 +5,21 @@ Input is provided in this format: ...@@ -5,6 +5,21 @@ Input is provided in this format:
type,from,stock,qnt,price type,from,stock,qnt,price
``` ```
Compile Main.java file using this command. It will compile all dependent classes:
```
javac Main.java
```
Execute the program using this command:
```
java Main
```
Sample input can be provided with the input file like this:
```
java Main < input
```
# Design # Design
There are 6 classes defined in this code. There are 6 classes defined in this code.
...@@ -32,4 +47,16 @@ The program currently maintains two linked lists - one for orders of type buy, a ...@@ -32,4 +47,16 @@ The program currently maintains two linked lists - one for orders of type buy, a
Pending orders are stored in these linked lists in chronological order. It finds the matches for an order through a linear scan and removes matched orders or modifies a partially matched order. If trade is possible, matched orders are return to Main class and displayed to the user. Pending orders are stored in these linked lists in chronological order. It finds the matches for an order through a linear scan and removes matched orders or modifies a partially matched order. If trade is possible, matched orders are return to Main class and displayed to the user.
# JUnit Tests # JUnit Tests
JUnit tests for a class is provided in file with same class name appended with "Test". For example, tests for OrderMatching class is in OrderMatchingTest class. JUnit tests for a class is provided in file with same class name appended with "Test". For example, tests for OrderMatching class is in OrderMatchingTest class.
\ No newline at end of file
# Java version
Java version
```
openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-3-b15)
OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)
```
Java compiler version
```
javac 1.8.0_141
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment