BrokerToolProject_by_CT
所属分类:Java编程
开发工具:Java
文件大小:141KB
下载次数:77
上传日期:2006-09-22 16:25:49
上 传 者:
cksmct
说明: java写的股票交易系统,分为使用rmi和不使用rmi两部分
(write java stock trading system, into use and not to use rmi rmi two parts)
文件列表:
BrokerToolProject_by_CT\3Tier_NonRMI\BrokerController.java (2612, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\BrokerControllerImpl.java (9579, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\BrokerException.java (424, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\BrokerModel.java (2553, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\BrokerView.java (1366, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\BrokerViewImpl.java (23917, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\compile.bat (303, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\Customer.java (908, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\db\BrokerModelDbImpl.java (29831, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\db (0, 2006-09-22)
BrokerToolProject_by_CT\3Tier_NonRMI\gui\BrokerGui.java (17428, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\gui (0, 2006-09-22)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\AddCustomerCommand.java (409, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\AddPortfolioCommand.java (448, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\Broker3TierClient.java (919, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\Broker3TierServer.java (559, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\Broker3TierThreadedServer.java (538, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\BrokerModelNwImpl.java (8532, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\BrokerServer.java (1860, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\Command.java (650, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\CommandClient.java (3014, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\CommandServer.java (1916, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\CommandTester.java (1146, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\DeleteCustomerCommand.java (418, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\DeletePortfolioCommand.java (461, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\GetAllCustomersCommand.java (284, 2004-02-22)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\GetAllStocksCommand.java (279, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\GetCustomerCommand.java (731, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\GetPortfolioCommand.java (711, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\GetStockCommand.java (507, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\IoStrategy.java (111, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\IoThread.java (998, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\IoThreadPoolManager.java (2238, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\NwClient.java (3780, 2005-12-29)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\NwServer.java (1672, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\TestNwClient.java (1063, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw\UpdateCustomerCommand.java (418, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\nw (0, 2006-09-22)
BrokerToolProject_by_CT\3Tier_NonRMI\Portfolio.java (1034, 2005-12-28)
BrokerToolProject_by_CT\3Tier_NonRMI\Share.java (1117, 2005-12-28)
... ...
*****************************************************************
* BrokerTool Project INSTRUCTIONS *
*****************************************************************
This document is provided as an instruction on what BrokerTool Project is, what our task is,and how to run the program.
It contains the following sections:
* BrokerTool Program Overview
* The BrokerTool Design
* Our task
* BrokerTool Project Directory Structure
* Running the program
---------------------------------------------------------------
BrokerTool Program Overview
---------------------------------------------------------------
BrokerTool Project is a vertical solution for a distributed, multitier application. Developers use graphical user interface (GUI) design principles and network communications capabilities to code a functional Java application that interacts with a networked database server.
With the BrokerTool,customer can query,manipulate information stored in Datebase ,and buy or sell stocks.
Specifications of the Legacy Server
-----------------------------------
*The database runs on a Single server.
*The database is PointBase, a powerful Structured Query Language (SQL) database with a small footprint.
*The database is designed with a specific schema that you cannot change.
*The database can receive string SQL commands and return string responses.
*You access the database through TCP/IP port 9092.
Customer Problem Statement
---------------------------
Functional Requirements:
*Buy, sell, and update stocks for customers in the database using the GUI
*Add customers to and remove customers from the database
*Modify customers name and address, but not a customers Social Security Number
*View the current price of any stock in the database
Project Resources:
A server machine, on which the PointBase database is installed
Multiple client graphic workstations on which the Java? 2 Platform, Standard Edition (J2SE?) is installed
Appletviewer or a browser, such as Netscape Navigator?
Project Constraints:
*Database queries should use the customers unique Social Security Number or a unique stock symbol
*Some initial work was completed by the consultant
BrokerTool Database Schema
---------------------------
Customer Table
ssn CHAR(15) NOT NULL
cust_name CHAR(40)
address CHAR(100)
Shares Table
ssn CHAR(15) NOT NULL
symbol CHAR(8) NOT NULL
quantity INT
Stock Table
symbol CHAR(15) NOT NULL
price real
------------------------------------------------------------------
The BrokerTool Design
------------------------------------------------------------------
BrokerTool Requirements Analysis
---------------------------------
1)Use Cases:
Use case 1: Create new customer
Use case 2: Delete customer
Use case 3: Update customer fields
Use case 4: View customer details
Use case 5: View customer list
Use case 6: View customer portfolio
Use case 7: Buy shares on behalf of a customer
Use case 8: Sell shares on behalf of a customer
Use case 9: View stock prices
2)General requirements:
Supporting multiple simultaneous users on the companys intranet
Servicing all use cases with a GUI
3)Constraints:
Presenting and updating information stored in PointBase
Information presented must be real time
4)Test cases:
Creating suitable test cases
5)Discovering the domain objects:
Customer class
Stock class
Share class
Portfolio class
Architectural Analysis ---Abstracting the Requirements
-------------------------------------------------------
The application needs the following:
*A GUI for displaying and altering stored information
*A software component that contains business logic and validates change requests
*A software component that contains access business logic for servicing requests
*A software component associated with the GUI that has application-specific GUI control logic for user gesture validation, user request validation, and user view navigation intelligence
Applying the MVC Design Pattern
--------------------------------
*Sketch the generic MVC participant interaction diagram.
*List the information encapsulated by the model.
*List the information displayed by the view.
*Define the display pages hosted by the view. *
*Define the services supported by the view in terms of a Java technology interface
*Define the services supported by the model in terms of a Java technology interface
*Define the services supported by the controller in terms of a Java technology interface
*Audit the MVC participants
*Document all data types: Identify domain objects and identify new objects
*Verify the integrity of the domain objects, the MVC interfaces, and support objects
---------------------------------------------------------------
Our task
---------------------------------------------------------------
Most work of this project has been done, so our group's task is to add Portfolio panel and stock panel, to complete the AllCustomers panel in Broker GUI, and to implement the related functions.At the end,we will complete a 3-tier-architecture BrokerTool project using RMI or not.
---------------------------------------------------------------
BrokerTool Project Directory Structure
---------------------------------------------------------------
BrokerToolProject
|
|
|-----3Tier_NonRMI
| |
| |------db
| |------gui
| |------nw
| |------trader --contains class files
| |
| |-----db
| |-----gui
| |-----nw
|
|---------RMI
| |
| |------db
| |------gui
| |------rmi
| |------trader --contains class files
| |
| |-----db
| |-----gui
| |-----rmi
----------------------------------------------------------------
Running the program
----------------------------------------------------------------
Software Versions
------------------
The Project files have been tested on the
following software configuration:
* Java 2 Platform, Standard Edition, v1.4
* PointBase v4.0
Run 3Tier_NonRMI application
-----------------------------
1)start PointBase,create StockMarket Database
2)cd \BrokerToolProject\3Tier_NonRMI
3)start the server
>java trader.nw.Broker3TierServer
4)start the client
>java trader.nw.Broker3TierClient
then program is running!
Run RMI application
--------------------
1)start PointBase,create StockMarket Database
2)cd \BrokerToolProject\RMI
3)Start the Java RMI registry
>rmiregistry
4)Start the server
>java trader.rmi.BrokerRMIServer
5)Start the Client
>java trader.rmi.BrokerRMIClient
ok,now customer can buy or sell stocks with BrokerTool.
近期下载者:
相关文件:
收藏者: