你好,我想请教一下,为什么4.6的本章实例的程序运行不了呢?
package cn.com.jaking.project;
public class Book {
private int id; //图书编号
private String name; //图书名称
private Booktype type; //图书类别
private String author; //作者
private String translat; //译者
private String publishing_company; //出版社
private double price; //价格
private int stock; //库存数量
//无参数构造法
public Book () {
}
//带参数构造法
public Book (int id, String name, Booktype type, String author, String translat, String publishing_company, double price, int stock) {
this.id = id;
this.name = name;
this.type = type;
this.author = author;
this.translat = translat;
this.publishing_company = publishing_company;
this.price = price;
this.stock = stock;
}
public String getAuthor () {
return author;
}
public void setAuthor (String author) {
this.author = author;
}
public int getId () {
return id;
}
public void setId (int id) {
this.id = id;
}
public Booktype getType () {
return type;
}
public void setType (Booktype type) {
this.type = type;
}
public String getName () {
return name;
}
public void setName (String name) {
this.name = name;
}
public double getPrice () {
return price;
}
public void setPrice (double price) {
this.price = price;
}
public String getPublishing_company () {
return publishing_company;
}
public void setPublishing_company (String publishing_company) {
this.publishing_company = publishing_company;
}
public int getStock () {
return stock;
}
public void setStock (int stock) {
this.stock = stock;
}
public String getTranslat () {
return translat;
}
public void setTranslat (String translat) {
this.translat = translat;
}
}
或者说在Eclipse中怎样去运行? |