Application Exceptions

DuplicateIDException.java Thrown when an attempt to create an existing record is encountered
InvalidTransactionException.java Thrown when the application requests an unknown database interface function.
RecordNotFound.html Thrown when a record is not found (surprisingly).

Data Definitions

CustomerRec.java CustomerRec.java is the an object representing a customer record in the database which contains the number of shares they own. All these objects are returned from the proxy server. They can be considered as "views" of the underlying database, isolating the application from physical implementation.
SharesRec.java SharesRec.java is a Share record.
StockRec.java StockRec.java is a stock/bond/instrument record.


Tier 1 - Database Access Layer

DBAccess.java DBAccess.java is the database interface. Our contract between the application and the database.
Database.java Database.java is the database abstraction class. Here are is the implementation of the above interface which makes direct SQL calls an mSQL database. This could equally be done using JDBC


Tier 2 - Proxy Server

dbProxy.java dbProxy.java handles client data requests by using the Database object. If you want to handle more clients, you have more than one dbProxy object - which means you can scale the solution.


Tier 3 - Application

UserInterface.java UserInterface is the binding between the required look and feel and the application. Called by TraderModel.
TraderModel.java TraderModel.java is controls how the application functions by choosing the relevant business model and view.
TraderModel.java TraderModel.java is controls how the application appears to the end user.
TraderController.java TraderController.java contains the business rules.
InfoDialog.java InfoDialog
CustomerDialog.java Panel to maintain customers
BuySellDialog.java Panel to sell/buy stocks.
PortfolioList.java Panel to display the Customers portfolio
MarketList.java Panel to display the current market status
UpdatingList.java List objects which are constantly updating their entries by observing changing values.

Utilities

TickerTape.java Implementation of a data ticker. Reads from a known socket using a TickerReader.
TickerReader.java Class to read the data from the data feed. The source is provided for you on the course but it doesn't take much to reimplement.
MakeFraction.java Utility class used by the TickerTape to convert decimals to fractions.



Last Updated