文件名称:src
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:3kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
摇色子程序。首先可以选择色子的面数(比如6或者10)。设定初始值后,摇动色子,得到新的点数。-1. a constructor that allows users of the class to specify the number of sides on each dice separately. In other words, the constructor has two input parameters.
2. methods that allow a user to set and get the face values of each dice object separately. For
instance, I could set the first dice s face value to 2 and the second dice s face value to 9
(assuming the second one is a 10-sided Dice).
3. a single method that rolls both dice
4. a method that returns the current sum of the face values on the dice
5. a toString method that returns an informative descr iption, such as "first dice: value,
second dice: value" where value would be the current face value of that dice.
2. methods that allow a user to set and get the face values of each dice object separately. For
instance, I could set the first dice s face value to 2 and the second dice s face value to 9
(assuming the second one is a 10-sided Dice).
3. a single method that rolls both dice
4. a method that returns the current sum of the face values on the dice
5. a toString method that returns an informative descr iption, such as "first dice: value,
second dice: value" where value would be the current face value of that dice.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
src/
src/.DS_Store
__MACOSX/
__MACOSX/src/
__MACOSX/src/._.DS_Store
src/Dice.java
src/DiceRoller.java
src/PairOfDice.java
src/.DS_Store
__MACOSX/
__MACOSX/src/
__MACOSX/src/._.DS_Store
src/Dice.java
src/DiceRoller.java
src/PairOfDice.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.