理财通
详细设计说明书
1引言 2
1.1编写目的 2
1.2背景 2
1.3定义 2
1.4参考资料 2
2程序系统的结构 2
3新增支出、我的支出设计说明 2
3.1程序描述 3
3.2功能 3
3.3性能 3
3.4输人项 3
3.5输出项 3
3.6算法 3
3.7流程逻辑 3
3.8接口 3
3.9存储分配 4
3.10注释设计 4
3.11限制条件 4
3.12测试计划 4
3.13尚未解决的问题 4
详细设计说明书
本详细设计说明书是针对该项目进行详细设计,在概要设计基础上进一步明确系统结构,详细的介绍系统的各块,对进行后面的实现和测试做准备。本详细设计说明书的预期读者为本项目小组的成员以及项目感兴趣的,在以后想对系统进行扩展和维护的人员。
系统名称:理财通
开发工具:Android Studio
开发者:吴涛 王润鑫 冯绍辉 罗志鹏 吕德冠
用户的便签信息:便签信息,保存,修改,删除
a. 《软件工程》,《java设计》
主界面中点击新增支出按钮进入新增支出界面,在金额、时间、类别、地点、备注等编辑框输入内容,点击保存,输入内容将会保存到数据表Tb_outaccount,点击我的支出按钮,将从数据表Tb_outaccount中调出数据并显示在listview中。
本程序输入金额要求为整数,其他要求不高。
金额:输入类型为整数
时间:输入类型yyyy-mm-dd(年-月-日)
类别:中文(字符串)
地点:中文(字符串)
备注:中文(字符串)
类别:中文(字符串)
金额:输入类型为整数
时间:输入类型yyyy-mm-dd(年-月-日)
无
添加支出信息接口:
public void add(Tb_outaccount tb_outaccount) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
// 执行添加支出信息操作
db.execSQL("insert into tb_outaccount (_id,money,time,type,address,mark) values (?,?,?,?,?,?)",
new Object[] { tb_outaccount.getid(), tb_outaccount.getMoney(), tb_outaccount.getTime(), tb_outaccount.getType(), tb_outaccount.getAddress(),
tb_outaccount.getMark() });
}
查找支出信息接口:
public Tb_outaccount find(int id) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
Cursor cursor = db.rawQuery("select _id,money,time,type,address,mark from tb_outaccount where _id = ?", new String[] { String.valueOf(id) });// 根据编号查找支出信息,并存储到Cursor类中
if (cursor.moveToNext()) {// 遍历查找到的支出信息
// 将遍历到的支出信息存储到Tb_outaccount类中
return new Tb_outaccount(cursor.getInt(cursor.getColumnIndex("_id")), cursor.getDouble(cursor.getColumnIndex("money")), cursor.getString(cursor
.getColumnIndex("time")), cursor.getString(cursor.getColumnIndex("type")), cursor.getString(cursor.getColumnIndex("address")),
cursor.getString(cursor.getColumnIndex("mark")));
}
return null;// 如果没有信息,则返回null
}
序号 | 字段 | 字段名 | 类型 | 长度 | 精度 | 小数位数 | 默认值 | 允许空 | 主键 | 说明 |
1 | _id |
| Int | 10 | √ | |||||
2 | money | 金额 | Int | 10 | ||||||
3 | time | 时间 | Int | 10 | √ | |||||
4 | type | 类别 | nvarchar | 25 | √ | |||||
5 | address | 地点 | nvarchar | 40 | √ | |||||
6 | mark | 备注 | nvarchar | 50 | √ | |||||
a. 加在模块首部的注释;
b. 加在各分枝点处的注释;
c. 对各变量的功能、范围、缺省条件等所加的注释;
无
主界面中点击新增收入按钮进入新增收入界面,在金额、时间、类别、付款方、备注等编辑框输入内容,点击保存,输入内容将会保存到数据表Tb_inaccount,点击我的收入按钮,将从数据表Tb_inaccount中调出数据并显示在listview中。
本程序输入金额要求为整数,其他要求不高。
金额:输入类型为整数
时间:输入类型yyyy-mm-dd(年-月-日)
类别:中文(字符串)
付款方:中文(字符串)
备注:中文(字符串)
类别:中文(字符串)
金额:输入类型为整数
时间:输入类型yyyy-mm-dd(年-月-日)
无
添加收入信息接口:
public void add(Tb_inaccount tb_inaccount) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
// 执行添加收入信息操作
db.execSQL("insert into tb_inaccount (_id,money,time,type,handler,mark) values (?,?,?,?,?,?)",
new Object[] { tb_inaccount.getid(), tb_inaccount.getMoney(), tb_inaccount.getTime(), tb_inaccount.getType(), tb_inaccount.getHandler(),
tb_inaccount.getMark() });
}
查找收入信息接口:
public Tb_inaccount find(int id) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
Cursor cursor = db.rawQuery("select _id,money,time,type,handler,mark from tb_inaccount where _id = ?", new String[] { String.valueOf(id) });// 根据编号查找收入信息,并存储到Cursor类中
if (cursor.moveToNext()) {// 遍历查找到的收入信息
// 将遍历到的收入信息存储到Tb_inaccount类中
return new Tb_inaccount(cursor.getInt(cursor.getColumnIndex("_id")), cursor.getDouble(cursor.getColumnIndex("money")), cursor.getString(cursor
.getColumnIndex("time")), cursor.getString(cursor.getColumnIndex("type")), cursor.getString(cursor.getColumnIndex("handler")),
cursor.getString(cursor.getColumnIndex("mark")));
}
return null;// 如果没有信息,则返回null
}
序号 | 字段 | 字段名 | 类型 | 长度 | 精度 | 小数位数 | 默认值 | 允许空 | 主键 | 说明 |
1 | _id |
| Int | 10 | √ | |||||
2 | money | 金额 | Int | 10 | ||||||
3 | time | 时间 | Int | 10 | √ | |||||
4 | type | 类别 | nvarchar | 25 | √ | |||||
5 | address | 付款方 | nvarchar | 40 | √ | |||||
6 | mark | 备注 | nvarchar | 50 | √ | |||||
d. 加在模块首部的注释;
e. 加在各分枝点处的注释;
f. 对各变量的功能、范围、缺省条件等所加的注释;
主界面中点击收支便签按钮进入收支便签界面,在编辑框输入内容,点击保存,输入内容将会保存到数据表Tb_flag,点击数据管理按钮,将从数据表Tb_flag中调出数据并显示在listview中,点击数据管理中支出信息、收入信息按钮,将从各自的数据表中调出数据并显示。
本程序输入字数不超过200字。
便签:中文(字符串)
1.便签信息:便签:中文(字符串)
2.收支信息:
类别:中文(字符串)
金额:输入类型为整数
时间:输入类型yyyy-mm-dd(年-月-日)
无
添加便签接口:
public void add(Tb_flag tb_flag) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
db.execSQL("insert into tb_flag (_id,flag) values (?,?)", new Object[] { tb_flag.getid(), tb_flag.getFlag() });// 执行添加便签信息操作
}
查找收入信息接口:
public Tb_flag find(int id) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
Cursor cursor = db.rawQuery("select _id,flag from tb_flag where _id = ?", new String[] { String.valueOf(id) });// 根据编号查找便签信息,并存储到Cursor类中
if (cursor.moveToNext()) {// 遍历查找到的便签信息
// 将遍历到的便签信息存储到Tb_flag类中
return new Tb_flag(cursor.getInt(cursor.getColumnIndex("_id")), cursor.getString(cursor.getColumnIndex("flag")));
}
return null;// 如果没有信息,则返回null
}
序号 | 字段 | 字段名 | 类型 | 长度 | 精度 | 小数位数 | 默认值 | 允许空 | 主键 | 说明 |
1 | _id |
| Int | 10 | √ | |||||
2 | Flag | 便签 | varchar | 100 | ||||||
g. 加在模块首部的注释;
h. 加在各分枝点处的注释;
i. 对各变量的功能、范围、缺省条件等所加的注释;
主界面中点击系统按钮进入系统设计界面,在编辑框输入密码,点击保存,输入的密码将会保存到数据表Tb_pwd,以后登录本APP的密码将修改为新的密码。
本程序输入只限字母,数字。
密码:字母加数字(字符串)
无
无
添加密码接口:
public void add(Tb_pwd tb_pwd) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
// 执行添加密码操作
db.execSQL("insert into tb_pwd (password) values (?)", new Object[] { tb_pwd.getPassword() });
}
更新密码接口:
public void update(Tb_pwd tb_pwd) {
db = helper.getWritableDatabase();// 初始化SQLiteDatabase对象
// 执行修改密码操作
db.execSQL("update tb_pwd set password = ?", new Object[] { tb_pwd.getPassword() });
}
序号 | 字段 | 字段名 | 类型 | 长度 | 精度 | 小数位数 | 默认值 | 允许空 | 主键 | 说明 |
1 | _id |
| Int | 10 | √ | |||||
2 | Pwd | 密码 | varchar | 100 | ||||||
j. 加在模块首部的注释;
k. 加在各分枝点处的注释;
l. 对各变量的功能、范围、缺省条件等所加的注释;
本文来源:https://www.2haoxitong.net/k/doc/9fe2d9d959eef8c75ebfb342.html
文档为doc格式