1、 1 目录 一、需求分析 . 2 二、概要设计 . 2 三、详细设计 . 3 四、调试分析 . 15 五、用户手册 . 15 六、测试数据 . 15 七、附录. 16 2 一、需求分析一、需求分析 编写一个模拟火灾报警的系统,要求能够做到完成报警编号的录入,删除, 修改,查询,删除功能,在某个地点按下报警,会显示出该地点的报警,并有报 警声音。 程序执行的命令: 1.进入系统的登录界面 2.进入系统后的界面选择 3.实现报警 二、概要设计二、概要设计 1. 功能模块图: 2. 构程序中所使用的数据结构的介绍 class GongNengJieMian extends Frame impleme
2、nts ActionListener /实现登录的主界面 public class DBConnect /数据源类 3本程序模块结构 class GongNengJieMian extends Frame implements ActionListener /主界面程序模块 class tianjia extends Frame implements ActionListener /添加报警点的程序模块 火灾报警管理系统 报 警 点 的 录 入 报 警 点 的 删 除 报 警 模 拟 3 class ShanChu extends Frame implements ActionListener
3、 /删除报警点的程序模块 class MoNi extends Frame implements ActionListener /模拟报警的程序模块 public class A extends JFrame /地图的现实的程序模块 各模块之间的调用关系如下: 主程序模块 数据的更新模块 报警模拟模块 三三详细设计详细设计 各功能模块的实现如下 1.主函数 public class Main public static void main(String args) new ZhuJieMian(); /调用主界面类 2.主界面 public class ZhuJieMian extends F
4、rame implements ActionListener private static final long serialV ersionUID = 1L; /设置容器的大小 Button b1,b2; Label l1; Box bo,bo1; Panel p,p1; ZhuJieMian() super(“主界面“); 4 b1=new Button(“进入系统“); b2=new Button(“退出系统“); l1=new Label(“欢迎进入火灾报警模拟系统“); p=new Panel(); p1=new Panel(); l1.setAlignment(Label.CENT
5、ER); l1.setFont(new Font(“Serif“,Font.PLAIN,40); l1.setForeground(Color.red); b1.setForeground(Color.red); b2.setForeground(Color.red); b1.setFont(new Font(“Serif“,Font.PLAIN,20); b2.setFont(new Font(“Serif“,Font.PLAIN,20); bo1=Box.createV erticalBox(); bo1.add(Box.createV erticalStrut(50); bo1.add(
6、l1); bo1.add(Box.createV erticalStrut(10); p1.add(bo1); bo=Box.createV erticalBox(); bo.add(b1); bo.add(Box.createV erticalStrut(20); bo.add(b2); bo.add(Box.createV erticalStrut(50); p.add(bo); add(p1,BorderLayout.NORTH); add(p,BorderLayout.SOUTH); b1.addActionListener(this); b2.addActionListener(this); setBounds(0,0,600,400); setVisible(true); this.addWindowListener(new WindowAdapter() public void windowClosing(WindowEv