readme.txt

来自「java写的股票交易系统」· 文本 代码 · 共 198 行

TXT
198
字号
*****************************************************************
*               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 customer’s name and address, but not a customer’s 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 customer’s 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 company’s 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.

  














⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?