⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 book.java

📁 大学java作业源程序
💻 JAVA
字号:
package problem_10;
//Book.java
//书类
public class Book {
	private String title;		//书名
	private String author;		//作者
	private String press;		//出版社
	private String date;		//出版时间
	private double price;		//价格
	
	public Book(String title, String author, String press, String date, double price){
		this.title = title;
		this.author = author;
		this.press = press;
		this.date = date;
		this.price = price;
	}
	
	//返回书名
	public String getTitle(){
		return title;
	}
	
	//返回作者
	public String getAuthor(){
		return author;
	}
	
	//返回出版社
	public String getPress(){
		return press;
	}
	
	//返回出版日期
	public String getDate(){
		return date;
	}
	
	//返回价格
	public double getPrice(){
		return price;
	}
	
	//设置书名
	public void setTitle(String title){
		this.title = title;
	}
	
	//设置作者
	public void setAuthor(String author){
		this.author = author;
	}
	
	//设置出版社
	public void setPress(String press){
		this.press = press;
	}
	
	//设置出版时间
	public void setDate(String date){
		this.date = date;
	}
	
	//设置价格
	public void setPrice(double price){
		this.price = price;
	}
}

⌨️ 快捷键说明

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