酒店管理系统
package hotelmanagementsystem;
import java.util.Scanner;
public class Hotel {
public static void main(String[] args) {
Room room1 = new Room();
Client c1 = new Client();
Scanner console = new Scanner(System.in);
System.out.println("欢迎来到迪拜帆船酒店!");
System.out.println("请输入指令 in-入住 out-退房 show-查房 exit-退出系统");
while(true)
{
int roomNum;
String name;
String enter = console.next();
if(enter.equals("in"))
{
System.out.println("请输入入住房间号和入住人姓名");
roomNum = console.nextInt();
if(check(roomNum))
{
System.out.println("该房间已有人,是否与他一同入住(请输入yes/no)");
String check = console.next();
if(check.equals("yes"))
{
System.out.println("对不起,这是不允许的!");
roomNum = console.nextInt();
}
else
{
System.out.println("请重新选择房价号");
roomNum = console.nextInt();
}
}
name = console.next(