搜索资源列表
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
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
Numberguess
- 猜数字的小游戏 游戏后台运行一个服务器软件,游戏者通过客户端程序登陆后,服务器随机产生一个1—100之间的随机数供游戏者猜,游戏者从客户端输入一个数值,如果该数比设定的数大,软件提示:“大了”,如果小,软件提示“小了”,若相等返回“猜对了,你共猜了*次”。服务器同时记录并维护一个游戏玩家的TOP10排行榜,供玩家查询。-Number guessing game game running in the background a server software, after landing of
Packet
- 网络编程随机数组产生ip地址,生成IP包,包括IP 包头,payload checksum-Network programming random array ip address to generate an IP packet, including IP header, payload checksum
test5
- 1、数字存取:通过随机数函数产生50个正整数,逐个将这些数写入文件file.dat中;然后读出这些数,在内存中对它们进行排序,再将排序后的数据逐个写入file.out文件中。 要求:分别使用字节流和字符流操作方式完成。 2、文件内容加行号:给定一个文件,通过文件读写,给文件内容加行号。 要求:使用缓冲流操作。 3、学生对象操作:设计学生类,把学生对象存储进文件,并能再从文件中读取。-Digital access: 50 positive integer random nu
QuickHit
- QuickHit小游戏,主要是为初学者练习抽象类和对象以及练习循环和输入输出,随机数等的使用。-QuickHit game for beginners to practice abstract classes and objects, as well as practice cycle and input and output, the use of random number.
Js
- 利用Javascr ipt编写的一个小程序,获取随机数。买彩票的话可以试试哦-Using a small program written in Javascr ipt, to get a random number. The lottery, then you can try Oh
NameWar
- 字符大战 --类似q宠大战的程序,游戏前输入挑战者与被挑战者的名称,也就是字符,用伪随机数生成战斗员情况的一个小游戏-A game character Wars- program similar q pet war the game before input challenger and the challenger' s name, that is, the character, with a pseudo-random number generation combatants
JAVA
- 有三个功能。 第一:撰写类Mylog,实现接口Loggable,完成在本地文件"MyLog.log"文件中的日志读写。 第二:分别使用FileOutput和BufferedOutputStream往二进制文件(Numbers.dat)中写入10个随机数,比较用时。 第三:编写查询程序,输入要查询的数字的索引,在实验第二题中的文件(Number.dat)中查询这个数显示到屏幕上。-Has three functions. : Write class Mylog, implement t
guessnumber
- Java语言实现的猜数字游戏 主要功能为输入数字判断是否与系统指定的随机数相同,相同则显示win!否则提示大了还是小了-Java language to achieve the main function of the guessing game to enter numbers to determine whether the system assigns a random number is the same, the same as the display win! Otherwise p