搜索资源列表
Random
- 模拟彩票购买,产生7位0-35之间的随机数。-Analog to buy lottery tickets, resulting in seven random number between 0-35.
KillYou
- 初学者做的小玩意儿,简单的循环,随机数的小程序-Gadgets beginners
Factory
- 生成随机数的JAVA程序,其中可以生成整数,字符串等类型的数据-Generate random data including String and Integer
75546076_2
- 分别用NumberFormat类的方法以及编写的类中的方法输出5的平方根。 通过一个20次的循环,每次获取1~8之间的一个随机数。-Methods were used and the preparation of the NumberFormat class methods in the class output of the square root of 5. 20 times through a loop, each time for between 1 to 8, a random n
Casino
- §6.4 节的程序洗牌时,首先随机地确定一副牌的两个位置,然后交互这两个位置的牌,我们玩牌时很少采用这种洗牌方式。一种常见洗牌方式是随机地从一副牌中抽出连续一叠牌,将它们放在剩余牌的最上面,并且不断重要这一过程。试将§6.4 节程序的洗牌程序改进为这种洗牌方式。(提示:只需修改§6.4 节程序的shuffle()方法,仍由伪随机数确定数组中的两个位置,然后将数组中间的连续一段元素移到最前;移动时既可逐个元素地向前移,也可考虑引入一个临时的辅助数组。)-§ 6.4 section of the p
log-normal
- log-normal随机数生成代码java-log-normal random number generation code in java
Common-function-about-Java-class
- 这个Java类可以用来求出随机数,算出0至1之间的随机小数,然后乘以100,这样就能求出0至100之间的随机整数了。-The Java class can be used to seek the random, and work out between 0 to 1 random decimal, and then multiplied by 100, so they could work out between 0 to 100 of the random integer.
RandomNumber
- 此代码实现生成用户指定范围内的多位不重复的随机数-This code realization within the scope specified user generated more than the random number is not repeated
ShapeExp2
- 个人原创代码:矩形、圆形、五角星等形状的操作。编写Java Application程序,创建一个接口Shape,其中有抽象方法area,类Circle 、Rectangle实现area方法计算其面积并返回。又有Star实现Shape的area方法,其返回值是0,Star类另有一返回值boolean型方法isStar;在main方法里创建一个Vector,根据随机数的不同向其中加入Shape的不同子类对象(如是1,生成Circle对象;如是2,生成Rectangle对象;如是3,生成Star对象)
Matrix
- 个人原创代码:编写Java Application程序的方法,声明一个矩阵类Matrix,成员变量是一个二维数组,设数组元素类型为int,请设计方法: (1)构造方法: Matrix() //构造一个10X10个元素的矩阵,没有数据 Matrix(int n,int m) //构造一个nXm个元素的矩阵,数据由随机数产生 Matrix(int table[][]) //以一个整型的二维数组构造一个矩阵 要求使用 this (2) 实例方法: public void
TimerDemo
- 在Java中使用定时器的实例源码,绘制数字的Canvas对象,设备定时器的运行时间,滚动屏幕,绘制数字的坐标点,生成0或1的随机数,重绘屏幕,生成-1到1的随机数。-use timermeno in java language
Roll
- 做一个应用程序模拟掷色子的游戏: 1)使用Math.random方法分别取得两个随机数(掷两次色子),每个随机数为范围在1-6之间的整数,把两个随机数相加(则和的范围是2-12); 2)模拟36000次,然后计算和为2-12间各数出现的几率。判断是否合理(如:有6种方式可以掷出和为7,所以7的出现几率应该大概为1/6)。 -To do an application simulates the dice game: 1) Use the Math.random method to
Observer
- 股票的价格随着时间会在一定范围内波动,对于每个股票,股民需要三种报告:股票的当前价格;股票价格的统计分析报告(最低价、最高价、均价);股票价格趋势预测(建议采用移动平均预测法)。根据实际情况,也可能需要增加其他类型的报告。提示:股价变动用随机数模拟:java.util.Random。代码运用观察者模式,编写了上述股票行情程序,当股票价格变动时,实现各种报告的更新。-The price of the stock will over time in a certain range, for eac
lotto
- 一个简单的公司年会抽奖系统,先把把本公司的人员信息加载,然后设置没次的抽奖人数,点击抽奖键按钮,进行、、主要运用java中的io流操作,多线程处理,随机数-A simple annual lottery system, the first of the company s personnel information load, and then set no times lottery number, click on the sweepstakes button, the main use o
GenRandomUtil
- 用于生产随机数文件类,可以自定义种子,生产数据写入文件。java实现。-For the production of the random number classes, you can customize the seed production data written to the file. java implementation.
Lottery-program
- 体育彩票抽奖程序,简单的产生7个随机数 。 -Lottery program Simple random number generation
GuessNum
- 1.电脑随机产生1-100的随机数 2.用户从控制台输入猜测数,系统提示大小直至猜测正确 3.用户选择是否继续操作-A computer randomly generate 1-100 of the random number to guess the number of users from the console input prompted to size up to guess the correct user to choose whether to continue
ArrayDemo
- (1) 声明数组 (2) 创建数组 (3) 初始化数组 (4) 输出数组 (5) 数组最大值、最小值及其索引 (6) 随机数组 (7) 从控制台接受任意个整数,以数组形式返回 (8) 数组到String 转化 (9) 扩张数组-(1) declare an array (2) create an array (3) initialize the array (4) the output array (5) an array of the m
myFrame
- 一个简单的24点小游戏的源代码,可以随机产生数并求解并且能设置随机数的上下限!-A simple 24-point game of the source code, you can generate random numbers and solved and can set the limits of random numbers!
java5
- java小程序 产生随机数,并求平均值 两种方法1、MyEclipse6.5+ jdk1.6 2、MyEclipse6.5+tomcat6.0+jdk1.6-java applet to generate random numbers, and, the average of the two methods, MyEclipse6.5+ jdk1.6 2 MyEclipse6.5+tomcat6.0+jdk1.6