an implementation of a Live Order Board for Silver Bars Marketplace has the following functionality:
- register an order.
register(order: Order) : userId
- cancel an order.
cancel(id: String)
- get summary information of live orders.
summary : List<Order>
summaryBuy : List<Order>
summarySell : List<Order>
- both price and quantity in kg is modeled as a double and no units/measurement system
- different order summary information for BUYs and SELLs and ALL as aggregated
- TDD Applied
- gradle has been used for assembly
- implementation is not synchronized
- orders modeled as final classes
- YAGNI applied
git clone git@github.com:eevirgen/sbmp-live-order-board.git
gradle clean build
(runs the Unit Tests and and creates the distribution asbuild/libs/sbmp-live-order-board.jar
)
com.silverbarsmp.MainKt
gradle run
- or can be done in an IDE
- or can be run by using jar which has been created by build :
java -jar build/libs/sbmp-live-order-board.jar
- to run with the console outputs
gradle test
- to run without the console outputs
gradle cleanTest