Skip to content
Devendra edited this page Aug 11, 2017 · 3 revisions

Components:

#ClassDiagram

Data Entities:

For this application, we have two entities; Stock and Trade. Stock is further classified as CommonStock and PreferredStock. Stock and Trade both are immutable and represents their state at a specific instant.

Repository:

To maintain trade transaction records in memory, we have TradeTransactionFacade. It represents necessary repository actions.

StockService:

This is the main interface which will be used by client to perform stock market operations like; buy / sell stocks, calculate Volume Weighted Stock Price or calculate GBCE All Share Index, etc.

Statistics:

We have a specialise java.util.stream.Collector => GeometricMeanEvaluatorCollector which calculates Geometric mean of Trade Transaction stream.

Clone this wiki locally