文件名称:GuessNumberGame
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2015-03-04
- 文件大小:
- 37kb
- 下载次数:
- 0次
- 提 供 者:
- 李**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编写程序,项目名与类名均为GuessNumberGame。
每次游戏程序随机产生一个0-9之间的整数,要求玩家输入自己猜的数字,并对用户输入数字进行检查,进行如下提示:
如果用户猜对了,则提示:恭喜你,猜对了。结束本次游戏。
如果用户猜错了,则提示:你猜的数字太(大或小)了。要求用户继续猜。
如果连续3次没有猜对,则提示:游戏失败。
一次游戏结束时,提示用户是否继续新的游戏,果用户选择继续,则开始新一次游戏,否则输出:你共进行了XXX次游戏,成功XXX次,失败XXX次。然后结束程序运行-Programming, project name and the class name are GuessNumberGame.
Every game program randomly generates an integer between 0-9, requires players to enter their guess numbers, and the user to enter numbers to check the following tips:
If you guess right, the prompt: Congratulations, you guessed it. The end of this game.
If you guess wrong, you are prompted: You guessed numbers too (big or small) a. Require the user to continue to guess.
If you have not guessed it three times in a row, the system prompts: The game failed.
When the end of the first game, the user is prompted whether to continue a new game, if the user chooses to continue, then start a new game once, otherwise the output: XXX times you conducted the game, success XXX times, failed XXX times. Then run the program ends
每次游戏程序随机产生一个0-9之间的整数,要求玩家输入自己猜的数字,并对用户输入数字进行检查,进行如下提示:
如果用户猜对了,则提示:恭喜你,猜对了。结束本次游戏。
如果用户猜错了,则提示:你猜的数字太(大或小)了。要求用户继续猜。
如果连续3次没有猜对,则提示:游戏失败。
一次游戏结束时,提示用户是否继续新的游戏,果用户选择继续,则开始新一次游戏,否则输出:你共进行了XXX次游戏,成功XXX次,失败XXX次。然后结束程序运行-Programming, project name and the class name are GuessNumberGame.
Every game program randomly generates an integer between 0-9, requires players to enter their guess numbers, and the user to enter numbers to check the following tips:
If you guess right, the prompt: Congratulations, you guessed it. The end of this game.
If you guess wrong, you are prompted: You guessed numbers too (big or small) a. Require the user to continue to guess.
If you have not guessed it three times in a row, the system prompts: The game failed.
When the end of the first game, the user is prompted whether to continue a new game, if the user chooses to continue, then start a new game once, otherwise the output: XXX times you conducted the game, success XXX times, failed XXX times. Then run the program ends
(系统自动生成,下载前可以参看下载内容)
下载文件列表
GuessNumberGame
...............\build
...............\build.xml
...............\.....\built-jar.properties
...............\.....\classes
...............\.....\.......\guesssnumbergame
...............\.....\.......\................\Guesssnumbergame.class
...............\.....\.......\................\Guesssnumbergame.java
...............\.....\empty
...............\.....\generated-sources
...............\.....\.................\ap-source-output
...............\dist
...............\....\GuessNumberGame.jar
...............\....\README.TXT
...............\GuessNumberGame.zip
...............\manifest.mf
...............\nbproject
...............\.........\build-impl.xml
...............\.........\genfiles.properties
...............\.........\private
...............\.........\.......\config.properties
...............\.........\.......\private.properties
...............\.........\.......\private.xml
...............\.........\project.properties
...............\.........\project.xml
...............\src
...............\...\guesssnumbergame
...............\...\................\Guesssnumbergame.java