书籍管理 JAVA

public class Book {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自动生成的方法存根
		Book1 book = new Book1("565656565","Java","zhangsan","cccccc",45);
	     book.show();
	}

}
class Book1{
	private String bookId;
	private String bookName;
	private String author;
	private String publisher;
	private int price;
	public Book1(){
		
	}
	public Book1(String bookId,String bookName,String author,String publisher,int price){
		this.bookId=bookId;
		this.bookName=bookName;
		this.author=author;
		this.publisher=publisher;
		this.price=price;
	}
	public void show(){
    System.out.println("书籍编号:"+bookId);
    System.out.println("书名:"+bookName);
    System.out.println("作者名:"+author);
    System.out.println("出版社:"+publisher);
    System.out.println("价钱:"+price);
	}
	
	
	public String getBookId() {
		return bookId;
	}
	public void setBookId(String bookId) {
		this.bookId = bookId;
	}
	public String getBookName() {
		return bookName;
	}
	public void setBookName(String bookName) {
		this.bookName = bookName;
	}
	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 int getPrice() {
		return price;
	}
	public void setPrice(int price) {
		this.price = price;
	}
	
	
	
}

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页