老婆说要研究买彩票,正好我最近有闲功夫,准备用C#开发一个双色球彩票号管理系统,主要的功能包括:输入/编辑/修改各期中奖号,生成统计图表,随机生号,预测号码(这个需要概率统计知识,还在研究当中)。设计文档大致如下:
Lottery Management System (LMS)
Introduction:
LMS is a tool for mange the Lottery number including inputting number, modifying number and deleting number. LMS also could do some analysis basing on the Lottery Number.
Function Description:
1. Lottery
a) Predict (TBD)
b) Random
c) TBD
d) Exit
2. Maintain
a) Input
i. Input the Number by Manual
ii. Input the Number automatically by system (download the number from http://www.zhcw.com/). (TBD)
b) Edit
c) Delete
d) Search
e) View
3. Analysis (TBD)
a) Red Number
i. Chart for the count of lottery number
ii. Chart for the series number
iii. Chart for the odd number
iv. Chart for the even number
b) Blue Number
i. Chart for the count of lottery number
ii. Chart for the odd number
iii. Chart for the even number
Flow Chart:
Engine |
DB |
Function |
Class |
UI |
Legend |
Input Lottery Number |
Edit Lottery Number |
Delete Lottery Number |
UI |
Lottery |
Dataset |
DB Engine |
DB |
Maintain |
Search Lottery Number |
View Lottery Number |
Model Design:
1. Engine (dll)
a) DB Engine (DBEngine.dll)
No. |
Functions |
Input |
Output |
Comment |
1 |
Open |
strConnection, string |
Int: 0=successful 1=failure |
Connect to the database |
2 |
Close |
void |
Void |
Close the connection with DB |