文件名称:Monster
- 所属分类:
 - JSP源码/Java
 - 资源属性:
 - [Java] [源码]
 - 上传时间:
 - 2013-05-16
 - 文件大小:
 - 2kb
 - 下载次数:
 - 2次
 - 提 供 者:
 - sc***
 - 相关连接:
 - 无
 - 下载说明:
 - 别用迅雷下载,失败请重下,重下不扣分!
 
下载 
            
                
                
	
	
	
	
                    别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
            如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
一个初级JAVA程序小游戏,不同的怪兽会有不同的攻击方式,满100伤害停止。-
1. The sub-questions below concern a Java application that deals with monsters.
i) Create a class called Monster (to be stored in file Monster.java), such that:
 Every monster has a name and,
 Every monster can attack and move (i.e. the class Monster has two methods, attack()
and move()).
A generic monster attack() method should return a random integer value between 1 and 5. It
should also print the following message to the console:
“NAME, of type CLASS_TYPE, attacks generically: X points damage caused.”
where:
NAME = monster name
CLASS_TYPE = class of monster1
X = random integer in the specified range
The monsters’ generic move() method should be defined as follows:
public void move(int directio
			1. The sub-questions below concern a Java application that deals with monsters.
i) Create a class called Monster (to be stored in file Monster.java), such that:
 Every monster has a name and,
 Every monster can attack and move (i.e. the class Monster has two methods, attack()
and move()).
A generic monster attack() method should return a random integer value between 1 and 5. It
should also print the following message to the console:
“NAME, of type CLASS_TYPE, attacks generically: X points damage caused.”
where:
NAME = monster name
CLASS_TYPE = class of monster1
X = random integer in the specified range
The monsters’ generic move() method should be defined as follows:
public void move(int directio
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1\Dragon.java
.\Monster.java
.\MonsterMash.java
.\Troll.java
1