欢迎来到天天文库
浏览记录
ID:15515767
大小:2.29 MB
页数:38页
时间:2018-08-03
《软件测试技术实验报告》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、《软件测试技术》实验报告河北工业大学计算机科学与软件学院2017年9月37软件说明电话号码问题某城市电话号码由三部分组成。它们的名称和内容分别是: 地区码:空白或三位数字; 前缀:非'0'或'1'的三位数字; 后缀:4位数字。流程图源代码importjava.awt.*;importjava.awt.event.*;publicclassPhoneNumberextendsFrameimplementsActionListener{/****/privatestaticfinallongserialVersi
2、onUID=1L;37privatefinalString[]st={"Name","Local","Prefix","Suffix"};staticintc_person=0;TextFieldt_name,t_local,t_prefix,t_suffix;RecordDialogd_record;MessageDialogd_message;persona[]=newperson[100];publicPhoneNumber(){super("电话号码");this.setSize(250,250);this
3、.setLocation(300,240);Panelpanel1=newPanel(newGridLayout(4,1));for(inti=0;i4、("");panel2.add(t_name);panel2.add(t_local);panel2.add(t_prefix);panel2.add(t_suffix);Panelpanel3=newPanel(newFlowLayout());Buttonb_save=newButton("Save");Buttonb_record=newButton("Record");panel3.add(b_save);panel3.add(b_record);this.setLayout(newBorderLayout5、());this.add("West",panel1);this.add("East",panel2);this.add("South",panel3);addWindowListener(newWindowCloser());b_save.addActionListener(this);b_record.addActionListener(this);d_record=newRecordDialog(this);d_message=newMessageDialog(this);this.setVisible(tr6、ue);37}privateclassRecordDialogextendsDialog{privatestaticfinallongserialVersionUID=1L;Frameframe;//对话框所依赖的框架窗口TextAreat_show;RecordDialog(Frameframe){super(frame,"记录",true);this.frame=frame;this.setSize(300,80);t_show=newTextArea(20,20);this.add(t_show);this.7、addWindowListener(newWindowCloser());}publicvoidshow(Strings){t_show.setText(s);this.setLocation(frame.getX()+100,frame.getY()+100);this.setVisible(true);}}privateclassMessageDialogextendsDialog{/****/privatestaticfinallongserialVersionUID=1L;Frameframe;//对话框所8、依赖的框架窗口Labellabel;//对话框中显示信息MessageDialog(Frameframe){super(frame,"消息",true);this.frame=frame;this.setSize(300,80);label=newLabel("",Label.CENTER);this.add(label);this.addWindowLis
4、("");panel2.add(t_name);panel2.add(t_local);panel2.add(t_prefix);panel2.add(t_suffix);Panelpanel3=newPanel(newFlowLayout());Buttonb_save=newButton("Save");Buttonb_record=newButton("Record");panel3.add(b_save);panel3.add(b_record);this.setLayout(newBorderLayout
5、());this.add("West",panel1);this.add("East",panel2);this.add("South",panel3);addWindowListener(newWindowCloser());b_save.addActionListener(this);b_record.addActionListener(this);d_record=newRecordDialog(this);d_message=newMessageDialog(this);this.setVisible(tr
6、ue);37}privateclassRecordDialogextendsDialog{privatestaticfinallongserialVersionUID=1L;Frameframe;//对话框所依赖的框架窗口TextAreat_show;RecordDialog(Frameframe){super(frame,"记录",true);this.frame=frame;this.setSize(300,80);t_show=newTextArea(20,20);this.add(t_show);this.
7、addWindowListener(newWindowCloser());}publicvoidshow(Strings){t_show.setText(s);this.setLocation(frame.getX()+100,frame.getY()+100);this.setVisible(true);}}privateclassMessageDialogextendsDialog{/****/privatestaticfinallongserialVersionUID=1L;Frameframe;//对话框所
8、依赖的框架窗口Labellabel;//对话框中显示信息MessageDialog(Frameframe){super(frame,"消息",true);this.frame=frame;this.setSize(300,80);label=newLabel("",Label.CENTER);this.add(label);this.addWindowLis
此文档下载收益归作者所有