展开全部
//这是用面向对象的e68a843231313335323631343130323136353331333363373065思想写的古龙小说陆小凤传奇里的一小段
public class Droiyan {
public static void main(String[] args) {
Time t = new Time(9,15,"夜");
Heroes xi = new Heroes("西门吹雪");
Heroes ye = new Heroes("叶孤城");
xi.life = true;ye.life = true;
Sword xis = new Sword(3,7,"天下利器");
Sword yes = new Sword(4,6,"海外寒剑精英");
xi.sword = xis;
ye.sword = yes;
final String str1 = "是。",str2 = "";
t.showTime();
System.out.println("紫禁之巅。");
System.out.println("两个人都是白衣如雪,一尘不染,他们的人已经变得向他们的剑一样,冷酷锋利,已完全没有人的感情。");
System.out.println("两个人互相凝视着,眼睛里都在发光。");
System.out.println(" ——这种凌厉的剑气,本就是他们自己本身发出来的。");
System.out.println(" ——可怕的也是他们本身这个人,并不是他们手里的剑。");
ye.say("一别多年,别来无恙?","忽然");
xi.say("多蒙成全,侥幸安好。", str2);
ye.say("旧事何必重提,今日之战,你我必当各尽全力。", str2);
xi.say(str1, str2);
ye.say("很好。", str2);
System.out.println("他说话的声音本已显得中气不足,说了两句话后,竟似已在喘息。");
xi.say(xi.sword.decripe(), "却还是面无表情,视若不见,扬起手中剑,冷冷");
ye.say(ye.sword.decripe(), "也扬起手中剑,");
System.out.println("两人的剑虽已扬起,却仍未出鞘——拔剑的动作,也是剑法中不可缺少的一门,两人显然也要比个高下。");
}
}
class Time{
int month;
int day;
String time;
public Time(int month,int day,String time){
this.month = month;
this.day = day;
this.time = time;
}
public void showTime(){
System.out.println(month+"月"+day+","+time+"。");
}
}
class Heroes{
String name;
String nickname;
String appearance;
Sword sword;
Fencing fencing;
boolean life;
public Heroes(String name){
this.name = name;
}
public void say(String str,String str1){
System.out.println(name+str1+"说道:"+str);
}
}
class Sword{
String color;
String shape;
int weight;
int length;
String dec;
public Sword(int weight,int length,String dec){
this.weight = weight;
this.length = length;
this.dec = dec;
}
public String decripe(){
return("此剑乃"+dec+","+"剑锋"+length+"尺"+(length/2)+"寸"+","+"净重"+weight+"斤"+(weight+2)+"两。");
}
}
class Fencing{
String name;
}