book.java

来自「这是一个JSP的网上书店」· Java 代码 · 共 49 行

JAVA
49
字号
package myBook;

public class Book{
	private int bookno=0;
	private String bookname=null;
	private String author=null;
	private String publisher=null;
	private float price=0.0f;
	public Book(int no,String name,String author,String publisher,float price)
	{
		this.bookno=no;
		this.bookname=name;
		this.author=author;
		this.publisher=publisher;
		this.price=price;
		
	}
	
	public int getBookno()
	{
		return this.bookno;
	}
	public String getBookname()
	{
		return this.bookname;
	}
	public String getAuthor()
	{
		return this.author;
	}
	public String getPublisher()
	{
		return this.publisher;
	}
	public float getPrice()
	{
		return this.price;
	}
	
	public boolean equals(Book b)
	{
		if(this.bookno==b.getBookno())
		{
		  return true;
		}else{
			return false;
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?