题目要求
首先将房间对象程序写出
package hoteltest;
public class Room {
int roomnum;
String type;
boolean statu;
public Room() {
super();
}
public Room(int roomnum) {
super();
this.roomnum = roomnum;
}
public Room(int roomnum, String type) {
super();
this.roomnum = roomnum;
this.type = type;
}
public Room(int roomnum, String type, boolean statu) {
super();
this.roomnum = roomnum;
this.type = type;
this.statu = statu;
}
@Override
public String toString() {
return "房间号" + roomnum + ", 房间类型" + type + ", 房间是否住人" + statu;
}
}
再写出酒店类(包括订房、退房、打印所有房间信息方法)
package hoteltest;
public class Hotel {
Room[][] room;
public Hotel() {
super();
}
public Hotel