1、回家的路软件设计说明书Darkking贺杨杰回家的路设计说明书第一章 引言 1.1 概述 回家的路系统设计说明书的目的在于从设计的角度明确回家的路的业务品种、功能范围,明确与业务主机/终端系统的接口和业务处理模式,使系统开发人员和产品管理人员明确产品功能,可以有针对性的进行系统开发、测试、验收等各方面的工作。1.2 背景 系统名称:回家的路组织:涉众:老大:开发者:Darkking1.3 定义 1.4 参考资料 回家的路用户调研及业务建模。回家的路需求与分析说明书。1.5 术语与缩写解释 2. 系统架构使用图和文字将系统的架构说明清楚,主要内容包括功能之间的关系。 系统架构图.3. 回家的路设
2、计说明3.1订票设计3.1.1类图3.1.2 实现类设计1. DemandCon类设计1) 属性说明无。2)方法设计 /*查询车票 */ public void query() / TODO: implement /1.请求查询车票/2.查询车票 /3.接收查询结果 /4a.显示查询的车票 /4b.显示查询失败界面 /*预订车票*/ public void bookingTickets() / TODO: implement /1.请求确认订票 /2.订票 /3.返回订票结果/4.把订票单存入数据库 2. Tickets类设计1) 属性说明departure:出发地,destination:目
3、的地,trainnumber:车次,ridingtime :乘客时间,ticketprice:票价。2) 方法设计/验证查询信息 public boolean query(String departure,String destination,String year, String month,String day) / TODO: implement /1.得到需要验证的信息 /2.验证信息 /3a.返回失败结果 /3b.返回成功结果/验证车票 public boolean bookingTickets(String departure) / TODO: implement /1.得到车票数
4、据 /2.验证数据 /3.返回结果3. MainView类设计1) 属性说明EditText:departure:选择出发地。destination:选择目的地。year、month和day:乘车日期Button:query:请求查询车票(跳转到查询界面)。(meal:请求改签。refund:请求退票)2)方法设计无。4. TicketsView类设计1) 属性说明TextView:departuretv:显示车票出发地。destinationtv:显示车票目的地。yeartv、monthtv、daytv:显示车票日期。ListView :listview:用来显示查询到的车票信息,包括车次,
5、出发地、目的地、时间和票价2)方法设计无。5. PayView类设计1) 属性说明EditText:name:输入乘客姓名。id:输入乘客身份证号Button:paynow:立即支付(跳转到支付成功界面)。2)方法设计无。6. PSview类设计1) 属性说明Button:back:返回主界面。2)方法设计 无。3.1.3.顺序图3.1.4 界面设计 3.2改签设计 3.2.1类图3.2.2 实现类设计1.DemandCon设计1)属性说明 无。2) 方法设计 /*改签*/ public boolean queryTOT() /1.请求改签 /2.改签 /3.删除将要改签的订票单 /4.显示当
6、日的车票信息 /5.选择车票 /6.将订票单存入到数据库 /7.返回改签结果1.Tickets设计1)属性说明departure:出发地,destination:目的地,trainnumber:车次,ridingtime :乘客时间,ticketprice:票价。2)方法设计/验证改签信息 public String queryTOT() / TODO: implement /1.得到当日其他车次的车票时间信息 /2.返回当日其他车次的车票时间信息 1.BTlist设计1)属性说明 ListView: abtickets:显示订票单信息。2)方法设计无。1.MSView设计1)属性说明 But
7、ton:Mback:返回主界面。2)方法设计无。3.2.3.顺序图3.2.4 界面设计 3.3 退票设计3.3.1类图3.3.2 实现类设计1.channel设计1)属性说明2)方法设计3.3.3.顺序图 3.3.4 界面设计 4. 数据库设计 public class ticketsDB extends SQLiteOpenHelper private static final String db = my.db; private static final int vs = 1; public ticketsDB(Context context) super(context, db, nul
8、l, vs); / TODO Auto-generated constructor stub Override public void onCreate(SQLiteDatabase arg0) / TODO Auto-generated method stub arg0.execSQL(create table ticketsdb( + id integer primary key autoincrement, + departure text, + destination text, + Trnumber text, + Ritime text, + Tiprice text + id t
9、ext + name text);); Override public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) / TODO Auto-generated method stub if(arg1!=arg2) arg0.execSQL(drop table ticketsdb); onCreate(arg0); public void insertdb(String departure,String destination,String Trnumber, String Ritime,String Tiprice,Stri
10、ng id,String name) SQLiteDatabase sql = this.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(departure, departure); cv.put(destination,destination); cv.put(Trnumber, Trnumber); cv.put(Ritime, Ritime); cv.put(Tiprice, Tiprice); cv.put(id, id); cv.put(name, name); sql.insert(tick
11、etsdb, departure = ?,destination = ?,Trnumber = ?,Ritime = ?,Tiprice = ?,id = ?,name = ?, cv); /查找数据 public Cursor search() SQLiteDatabase sql = this.getReadableDatabase(); Cursor c = sql.query(ticketsdb, null, null, null, null, null, null); return c; 4.1 CDM图4.2 PDM图 4.3 数据库脚本/*=*/* DBMS name: Syba
12、se SQL Anywhere 11 */* Created on: 2015/8/25 19:17:00 */*=*/if exists(select 1 from sys.sysforeignkey where role=FK_关联_关联_PASSENGE) then alter table 关联 delete foreign key FK_关联_关联_PASSENGEend if;if exists(select 1 from sys.sysforeignkey where role=FK_关联_关联2_TICKETS) then alter table 关联 delete foreig
13、n key FK_关联_关联2_TICKETSend if;if exists( select 1 from sys.sysindex i, sys.systable t where i.table_id=t.table_id and i.index_name=passenger_PK and t.table_name=passenger) then drop index passenger.passenger_PKend if;if exists( select 1 from sys.systable where table_name=passenger and table_type in
14、(BASE, GBL TEMP) then drop table passengerend if;if exists( select 1 from sys.sysindex i, sys.systable t where i.table_id=t.table_id and i.index_name=tickets_PK and t.table_name=tickets) then drop index tickets.tickets_PKend if;if exists( select 1 from sys.systable where table_name=tickets and table
15、_type in (BASE, GBL TEMP) then drop table ticketsend if;if exists( select 1 from sys.sysindex i, sys.systable t where i.table_id=t.table_id and i.index_name=关联2_FK and t.table_name=关联) then drop index 关联.关联2_FKend if;if exists( select 1 from sys.sysindex i, sys.systable t where i.table_id=t.table_id
16、 and i.index_name=关联_FK and t.table_name=关联) then drop index 关联.关联_FKend if;if exists( select 1 from sys.sysindex i, sys.systable t where i.table_id=t.table_id and i.index_name=关联_PK and t.table_name=关联) then drop index 关联.关联_PKend if;if exists( select 1 from sys.systable where table_name=关联 and tab
17、le_type in (BASE, GBL TEMP) then drop table 关联end if;/*=*/* Table: passenger */*=*/create table passenger ( IDnumber char(18) not null, name char(12) null, constraint PK_PASSENGER primary key (IDnumber);/*=*/* Index: passenger_PK */*=*/create unique index passenger_PK on passenger (IDnumber ASC);/*=
18、*/* Table: tickets */*=*/create table tickets ( departure char(10) null, destination char(10) null, trainnumber char(10) not null, ridingtime char(10) null, ticketprice char(10) null, constraint PK_TICKETS primary key (trainnumber);/*=*/* Index: tickets_PK */*=*/create unique index tickets_PK on tic
19、kets (trainnumber ASC);/*=*/* Table: 关联 */*=*/create table 关联 ( IDnumber char(18) not null, trainnumber char(10) not null, constraint PK_关联 primary key clustered (IDnumber, trainnumber);/*=*/* Index: 关联_PK */*=*/create unique clustered index 关联_PK on 关联 (IDnumber ASC,trainnumber ASC);/*=*/* Index: 关
20、联_FK */*=*/create index 关联_FK on 关联 (IDnumber ASC);/*=*/* Index: 关联2_FK */*=*/create index 关联2_FK on 关联 (trainnumber ASC);alter table 关联 add constraint FK_关联_关联_PASSENGE foreign key (IDnumber) references passenger (IDnumber) on update restrict on delete restrict;alter table 关联 add constraint FK_关联_关联2_TICKETS foreign key (trainnumber) references tickets (trainnumber) on update restrict on delete restrict;5. 接口设计 5.1 与自助设备接口 5.2 与主机接口 5.3 内部接口
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1