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

📄 hotel.java

📁 旅馆预订系统.采用jstl+oracle,jsp/servlet,,供初学者学习用.
💻 JAVA
字号:
package HotelSystem;

class Hotel extends Houses {
	private int Id;

	private String name;

	private String city;

	private int rcount = 100;

	private int dcount = 100;

	private int rprice;

	private int dprice;

	public int getId() {
		return Id;
	}

	public void setId(int id) {
		Id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public int getDcount() {
		return dcount;
	}

	public void setDcount(int dcount) {
		if (dcount >= 0) {
			this.dcount = dcount;
		} else {
			System.out.println("普通房间不够!!");
		}
	}

	public int getDprice() {
		return dprice;
	}

	public void setDprice(int dprice) {
		if(dprice> 95){
		this.dprice = dprice;
		}
		else
		{
			System.out.print("金额必须大于95");
		}
	}

	public int getRprice() {
		return rprice;
	}

	public void setRprice(int rprice) {
		if (rprice > 45) {
			this.rprice = rprice;
		} else {
			System.out.print("金额必须大于45");
		}
	}

	public int getRcount() {
		return rcount;
	}

	public void setRcount(int rcount) {
		if (rcount >= 0) {
			this.rcount = rcount;
		} else {
			System.out.println("豪华房间不够!!");
		}
	}
}

⌨️ 快捷键说明

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