CRC Cards design

[Overall graph]

 

[Cards]

UserInterface
Responsibility:

Get the user input, including stock name and time interval now; Send the stock name to DataFeedManager; Send the time interval to the Alarm;

Collaborators:

DataFeedManager, Alarm

Comments:

Later on, we plan to add the 'log in' function, which will introduce another 'authentication' server and the whole log-in process;

Also we plan to support multiple stocks and the correspondent time intervals as well;

 

DataFeedManager
Responsibility:

Establish and maintain a 'robust' connection between the application and the DB server; Get 'stock' name from the user input; Query for the information of the certain stock requested by user; Receive all the packages from the DB server; Send all the stock information to the interpreter;

Collaborators:

UserInterface, DataFeedInterpreter

Comments:

 

DataFeedInterpreter
Responsibility:

Interpret the raw data from the DataFeedManager; Send the price change to the ResultConverter; When requested by 3PBController, send the current high/low price to the controller;

Collaborators:

DataFeedManger, ResultConverter, 3PBController

Comments:

 

3PBController
Responsibility:

When signaled by the Alarm, request the high/low price at the end of this period from the DataFeedInterpreter; Send the prices to the 3PBAlgorithm and get the result from it; Send the updated 3PB from the algorithm to the ResultConverter;

Collaborators:

Alarm, DataFeedInterpreter, 3PBAlgorithm, ResultConverter

Comments:

 

3PBAlgorithm
Responsibility:

Get the status of the end of the time slice, calculate the new 3PB and send it back to the controller;

Collaborators:

3PBController

Comments:

 

ResultConverter
Responsibility:

Get the price change or updated 3PB, generate certain kind of display results and send them to the UserInterface;

Collaborators:

DataFeedInterpreter, 3PBController, UserInterface

Comments:

In the later version, we plan to allow the user to choose different methods to display the results. We will use the STRATEGY pattern to implement this

 

Alarm
Responsibility:

Get the time slice length from the UserInterface; Once the current time slice passed by, signal the 3PBController to update the 3PB if necessary;

Collaborators:

UserInterface, 3PBController

Comments:

 


Maintained by Team C. 02/22/2002.