import javafx.application.Application;import javafx.event.ActionEvent;import javafx.event.EventHandler;import javafx.scene.Scene;import javafx.scene.c...
分类:
编程语言 时间:
2015-04-08 00:58:10
阅读次数:
244
以下为测试代码,实现测试输入是否合法及是否为闰年(四年一闰,百年不闰,四百年再闰):import javafx.application.Application;import javafx.event.ActionEvent;import javafx.event.EventHandler;impor...
分类:
编程语言 时间:
2015-04-08 00:54:34
阅读次数:
204
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u...
关于闰年测试的问题:条件:1.4 年一闰, 100 年不闰,400年又闰。 2. 输入年份大于0。 3. 输入只能为数字。源代码:public class leapyear extends Application { public static void main(String[] args...
分类:
其他好文 时间:
2015-04-07 23:10:25
阅读次数:
134
首先简要介绍一下公历上规定的闰年:四年一闰,百年不闰,四百年再闰。 针对这一规则,简要的设计部分测试用例: 附(测试截图):以下为该程序代码段:import javafx.application.Application;import javafx.event.ActionEvent;...
分类:
编程语言 时间:
2015-04-07 23:08:34
阅读次数:
312
一、闰年的定义4 年一闰, 100 年不闰,400年又闰二、需求分析要求输入框输入年份,点击按钮,出现提示。并能有效的处理任何输入三、测试用例内容 取值 预期结果被400整除 2400 是闰年被100整除但不被400整除 1700 ...
分类:
其他好文 时间:
2015-04-07 19:24:32
阅读次数:
147
问题实现实现一个闰年测试的JAVA代码如下:package leapyear;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax....
分类:
编程语言 时间:
2015-04-07 19:15:05
阅读次数:
183
一、问题 在一个简单的闰年问题的判断中,输入框获取的字符串,我们希望输入数字字符串,将字符串转换为int整数进行判断。编写程序如下using System;using System.Collections.Generic;using System.ComponentModel;using Sy...
在一个简单的闰年问题的判断中,从输入框获取字符串,并进行判断:结果如下::但当输入非数字的字符串时,会抛出异常:解决如下:
分类:
其他好文 时间:
2015-04-07 19:06:25
阅读次数:
156
测试闰年的算法:算法1:int year;cin >> year;if(year % 4 != 0) cout > year;if(year % 4 == 0 && year % 100 != 0) cout << "是闰年";else if(year % 400 == 0) cout << ...
分类:
编程语言 时间:
2015-04-07 17:21:08
阅读次数:
159