「西游记java」西游记86版全集

博主:adminadmin 2022-11-24 02:29:09 66

今天给各位分享西游记java的知识,其中也会对西游记86版全集进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

求java大神的源程序

/**

* 西游记人物类

*

* @author 你好邱林和

*

*/

public class XiYouJiRenWu {

private int height;// 身高

private String name;// 名字

private String weapon;// 武器

// 含参的构造函数,对对象进行初始化

public XiYouJiRenWu(String name, String weapon) {

this.name = name;

this.weapon = weapon;

}

public int getHeight() {

return height;

}

public void setHeight(int height) {

this.height = height;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getWeapon() {

return weapon;

}

public void setWeapon(String weapon) {

this.weapon = weapon;

}

public void printName() {

System.out.println("名字为:" + getName());

}

public void printWeapon() {

System.out.println("武器是:" + getWeapon());

}

public static void main(String[] args) {

// 新建一个猪八戒对象并进行初始化

XiYouJiRenWu zhuBaJie = new XiYouJiRenWu("猪八戒", "九齿钉耙");

zhuBaJie.printName();

zhuBaJie.printWeapon();

// 新建一个孙悟空的对象并进行初始化操作

XiYouJiRenWu sunWuKong = new XiYouJiRenWu("孙悟空", "金箍棒");

sunWuKong.printName();

sunWuKong.printWeapon();

}

}

运行结果为:

不懂再问好了

java四大名著是哪些书

中国古典长篇小说四大名著,简称四大名著,是指《红楼梦》、《三国演义》、《水浒传》、《西游记》这四部巨著。

Java编程题编写一个Java Application程序包含Person类、Student(学?

public class Person {

private String name;//姓名

private String sex;//性别

public void sayHello() {

System.out.println("姓名:" + name);

System.out.println("性别:" + sex);

}

public Person() {

}

public Person(String name, String sex) {

this.name = name;

this.sex = sex;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getSex() {

return sex;

}

public void setSex(String sex) {

this.sex = sex;

}

}

public class Student extends Person {

private String num;//学号

private String school;//学校

public void sayHello() {

super.sayHello();

System.out.println("学号:" + num);

System.out.println("学校:" + school);

}

public Student(String num, String school) {

this.num = num;

this.school = school;

}

public Student(String name, String sex, String num, String school) {

super(name, sex);

this.num = num;

this.school = school;

}

public Student() {

}

public String getNum() {

return num;

}

public void setNum(String num) {

this.num = num;

}

public String getSchool() {

return school;

}

public void setSchool(String school) {

this.school = school;

}

}

public class Test {

public static void main(String[] args) {

Student stu1 = new Student();

stu1.setName("张三");

stu1.setSex("男");

stu1.setNum("20211225001");

stu1.setSchool("北京大学");

Student stu2 = new Student("20211225002", "北京大学");

stu2.setName("李四");

stu2.setSex("男");

Student stu3 = new Student("王五", "女", "20211225003", "清华大学");

Person person1 = new Person();

person1.setName("赵六");

person1.setSex("女");

Person person2 = new Person("孙七", "女");

stu1.sayHello();

stu2.sayHello();

stu3.sayHello();

person1.sayHello();

person2.sayHello();

}

}

手机游戏 西游记ol怎么刷金砖 刷银

刷金需要用到:

电脑、JAVA模拟器、西游记JAR格式文件。

其实挺简单的,

就是先用电脑下载JAVA模拟器、再下载西游记OLJAR的文件。

然后打开多个模拟器窗口、每个都登进同一个号、

有时候会有秒金活动、所以那时候、每个窗口同一时间秒一次、中一次500金、因为每人只能秒一次、所以你开几个窗口就有几次机会、但必须要快。

【更多资讯可以访问K73电玩之家】

用java定义一个图书类,要求包含作者,书名,书号,价格等信息并要求从主函数输出一本书的信息。

package cn.book;

public class Book {

private String auther="吴承恩";

private String name="西游记";

private String number="1";

private double price=100;

public String getAuther() {

return auther;

}

public void setAuther(String auther) {

this.auther = auther;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getNumber() {

return number;

}

public void setNumber(String number) {

this.number = number;

}

public double getPrice() {

return price;

}

public void setPrice(double price) {

this.price = price;

}

@Override

public String toString() {

return " 作者:" + auther + ", 书名:" + name + ", 书号:" + number + ", 价格:" + price ;

}

//可以从这调用get set 方法 设置属性

public static void main(String[] args) {

Book book = new Book();

System.out.println(book.toString());

}

}

java创建一个图书类

public class Book {

public String name; //书名

public String author; //作者

public String publisher; //出版社

public String state; //状态:STATE_IN 在馆  STATE_OUT 外借

public static String STATE_IN = "in";

public static String STATE_OUT = "out";

public Book(String name, String author, String publisher){

this.name = name;

this.author = author;

this.publisher = publisher;

}

public Book(String name, String author, String publisher, String state){

this.name = name;

this.author = author;

this.publisher = publisher;

this.state = state;

}

public static void main(String[] args) {

Book book1 = new Book("西游记", "吴承恩", "新华出版社");

book1.setState(STATE_IN);

Book book2 = new Book("水浒传", "施耐庵", "新华出版社", STATE_IN);

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getAuthor() {

return author;

}

public void setAuthor(String author) {

this.author = author;

}

public String getPublisher() {

return publisher;

}

public void setPublisher(String publisher) {

this.publisher = publisher;

}

public String getState() {

return state;

}

public void setState(String state) {

this.state = state;

}

}

西游记java的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于西游记86版全集、西游记java的信息别忘了在本站进行查找喔。

The End

发布于:2022-11-24,除非注明,否则均为首码项目网原创文章,转载请注明出处。