你的位置:首页 > 信息动态 > 新闻中心
信息动态
联系我们

2022.9.2-2022年王建民JAVA课前测试

2022/9/2 21:57:27

石家庄铁道大学2022年秋季

  2021 级课堂测试试卷(一)(15分)

课程名称: JAVA语言程序设计  任课教师王建民        考试时间: 150 分钟 

 

一、考试要求:

1、按照测试内容要求完成程序的设计与编程;

2、建立学号姓名文件夹,如:“信2105-3班20213709叶照心”,将源程序文件、保存在文件夹中,压缩成rar文件提交。

3、以班级为单位上交最终考试结果。

4、需要在程序开始的注释中注明班级、学号、姓名。

 

二、 数据结构要求:(5分)

 

1、定义公寓类,类名:RoomInformation,其中包括五个私有变量(roomno,stunno1,stunno2,stunno3,stunno4,hygienescore)。

各成员的含义如下:

变量 roomno 为字符串类型 String,最长八位,用于存储宿舍号(例如:9#502表示9栋502宿舍)。

变量 stunno1,stunno2、stunno3、stunno4 为字符串类型 String,用于存储学生的学号,长度8位(如果某个学号为空,表示没有数值,代表该宿舍空余一个床位;如果四个学号都为空,表示该宿舍为空宿舍)。

变量hygienescore为int 类型,用于存储宿舍的卫生评分,初始值为0,数值范围0——100;

卫生评价等级:90分(含90分)以上为优秀,80分(含80分)以上为良好、60分(含60分)以上为合格、60分以下为不合格。

对每个变量定义 get()(读取变量信息)和 set()(设置变量信息)的方法。

2、赋初值方法包括五个参数,用于为变量(roomno,stunno1,stunno2,stunno3,stunno4,hygienescore)赋值。

 

三、 功能要求:(10分)

 

该系统完成石家庄铁道大学学生公寓管理的简单功能,定义RoomManagement类完成下列功能。

1、利用数组实现至少存储十个宿舍的基本信息; (要求十条记录中包含三条空宿舍信息(即只有宿舍号,四个学号为空),三条床位空信息(即,四个学号不全为空))。1分)

2、宿舍管理系统的主界面如下图所示:1分)

①界面要求;(0.5分)

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

***********************************************************

1、宿舍查询

2、安排新宿舍

3、调整宿舍

4、宿舍卫生评价

5、卫生检查情况查询

**********************************************************

 

 

②功能说明

输入数字1-6执行相应的功能,输入其他数字提示错误信息(该选项不存在),并返回主界面。(0.5分)

2、宿舍信息查询功能操作流程:(2分)

①在主界面选择“1、宿舍查询”功能后,进入“宿舍查询”界面,显示所有宿舍的基本信息,如下图所示:

 

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

***********************************************************

宿舍详细信息列表

1、9#101   4人   已满

2、9#102   4人   已满

3、9#103   3人 空1人

4、9#104   2人 空1人

5、9#105   1人 空3人

6、9#106   4人   已满

7、9#107   0人   空宿舍

8、9#108   0人   空宿舍

9、9#109   0人   空宿舍

 

…………………….

**********************************************************

②至少显示10条宿舍信息(不足10条扣除0.5分);

③无法按照图示样式显示宿舍信息扣除0.5分;

④无法自动判断宿舍状态信息(已满、空1人,空宿舍等状态信息)扣除0.5分;

⑤缺少空宿舍或者空床位信息扣除0.5分。

 

3、安排新宿舍功能操作流程:(2分)

①在主界面选择“2、安排新宿舍”功能后,进入“安排新宿舍”界面,显示所有空宿舍的基本信息,如下图所示:

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

安排新宿舍

***********************************************************

空宿舍详细信息列表

1、9#107   0人   空宿舍

2、9#108   0人   空宿舍

3、9#109   0人   空宿舍

…………………….

请输入新宿舍号:XXXXX

**********************************************************

提示用户输入空宿舍号:

②用户输入宿舍号后,如果该宿舍不是空宿舍,则提示错误信息“该宿舍不是空宿舍,无法安排新生”。(0.5分)

 

 

 

 

③用户输入宿舍号正确如下图所示:

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

安排新宿舍

***********************************************************

新宿舍号:

1、床位1:XXXXX(学号1)

2、床位2:XXXXX(学号2)

3、床位3:XXXXX(学号3)

4、床位4:XXXXX(学号4)

 

**********************************************************

④依次输入住宿人的学号,最多输入四个人的学号,输入第四个人的学号完毕,如果是,“提示该宿舍已满”,表示该宿舍分配完毕,返回上一级主页面。(0.5分)

⑤如果输入的学号与前面存储记录中的任一学号重复,提示“该学生已分配宿舍”,清空输入,回到当前界面。(0.5分)

⑥如果在输入学号时输入(END)代表该宿舍分配完成,返回上一级主页面。(0.5分)

 

4、调整宿舍功能操作流程:(2分)

①在主界面选择“3、调整宿舍”功能后,进入“调整新宿舍”界面,显示所有有空床位的宿舍的基本信息,如下图所示:

 

 

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

调整宿舍

***********************************************************

有空床位宿舍详细信息列表

1、9#103   3人   空1人

2、9#104   2人   空2人

3、9#105   1人   空3人

…………………….

请输入待调整宿舍号:XXXXX

**********************************************************

提示用户输入空宿舍号:

②用户输入宿舍号后,如果该宿舍不是有空床位的宿舍,则提示错误信息“该宿舍没有空床位,无法调整”。(0.5分)

③用户输入宿舍号正确如下图所示:

显示已有的床位信息:

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

调整宿舍

***********************************************************

待调整宿舍号:9#103

1、床位1:XXXXX(学号1)

2、床位2:XXXXX(学号2)

3、床位3:XXXXX(学号3)

4、床位4:20213709叶照心(用户输入)

 

**********************************************************

④填写空床位的学号信息,判断该宿舍是否已有四人入住;如果是,“提示该宿舍已满”,表示该宿舍分配完毕,返回上一级主页面。(0.5分)

⑤如果输入的学号与前面存储记录中的任一学号重复,提示“该学生已分配宿舍”,清空输入,回到当前界面。(0.5分)

⑥如果在输入学号时输入(END)代表该宿舍分配完成,返回上一级主页面。(0.5分)

 

5、宿舍卫生评价功能操作流程:(1分)

①在主界面选择“4、宿舍卫生评价”功能后,进入“宿舍卫生评价”界面,如下图所示:

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

宿舍卫生宿舍

***********************************************************

请输入待评价宿舍号:XXXXX

**********************************************************

提示用户输入待评价宿舍号:

②用户输入宿舍号后,如果该宿舍是空宿舍,则提示错误信息“该宿舍为空宿舍”,清空输入,回到当前界面。(0.5分)

③用户输入评价宿舍号正确如下图所示:

 

显示该宿舍人员信息:

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

宿舍卫生评价

***********************************************************

宿舍号:9#103

1、床位1:XXXXX(学号1)

2、床位2:XXXXX(学号2)

3、床位3:XXXXX(学号3)

4、床位4:XXXXX(学号4)

 

输入宿舍卫生评价分数:XXXXXXX

**********************************************************

④用户输入卫生评价分数,判断输入数值0-100之间,超出范围,提示“输入错误”,清空输入,回到当前界面,输入正确的数值,返回到“宿舍卫生评价”主界面。(0.5分)

 

6、卫生检查情况查询功能操作流程:(1分)

 

①在主界面选择“5、卫生检查情况查询”功能后,进入“卫生检查情况查询”界面,按照图示样式显示宿舍卫生情况信息: (1分)

 

 

 

 

 

***********************************************************

石家庄铁道大学

学生公寓管理系统v2022

卫生检查情况查询

***********************************************************

宿舍卫生检查情况信息

1、9#101   50   不合格

2、9#102    90   优秀

3、9#103   85   良好

4、9#104  75   合格

5、9#105  65   合格

6、9#106   72   合格

 

…………………….

**********************************************************

②未根据分值正确显示卫生等级扣除0.5分。

 

 

 

import java.util.Scanner;
class RoomInformation {
    private String roomno = "";
    private String stunno1 = "";
    private String stunno2 = "";
    private String stunno3 = "";
    private String stunno4 = "";
    private int hygienescore = 0;

    public String getRoomno() {
        return roomno;
    }

    public String getStunno1() {
        return stunno1;
    }

    public String getStunno2() {
        return stunno2;
    }

    public String getStunno3() {
        return stunno3;
    }

    public String getStunno4() {
        return stunno4;
    }

    public int getHygienescore() {
        return hygienescore;
    }

    public void setRoomno(String roomno) {
        this.roomno = roomno;
    }

    public void setStunno1(String stunno1) {
        this.stunno1 = stunno1;
    }

    public void setStunno2(String stunno2) {
        this.stunno2 = stunno2;
    }

    public void setStunno3(String stunno3) {
        this.stunno3 = stunno3;
    }

    public void setStunno4(String stunno4) {
        this.stunno4 = stunno4;
    }

    public void setHygienescore(int hygienescore) {
        this.hygienescore = hygienescore;
    }

    public RoomInformation(String roomno, String stunno1, String stunno2, String stunno3, String stunno4,
            int hygienescore) {
        super();
        this.roomno = roomno;
        this.stunno1 = stunno1;
        this.stunno2 = stunno2;
        this.stunno3 = stunno3;
        this.stunno4 = stunno4;
        this.hygienescore = hygienescore;
    }

}

public class RoomManagement {

    static RoomInformation[] Room = new RoomInformation[10];
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        Room[0] = new RoomInformation("1#101", "20210001", "20210002", "20210003", "20210004", 100);
        Room[1] = new RoomInformation("1#102", "20210021", "20210022", "20210023", "20210024", 90);
        Room[2] = new RoomInformation("1#103", "20210031", "20210032", "20210033", "20210034", 80);
        Room[3] = new RoomInformation("1#104", "20210041", "20210042", "20210043", "20210044", 70);
        Room[4] = new RoomInformation("1#201", "", "", "", "", 0);
        Room[5] = new RoomInformation("1#202", "", "", "", "", 0);
        Room[6] = new RoomInformation("1#203", "", "", "", "", 0);
        Room[7] = new RoomInformation("1#301", "20213011", "", "", "", 50);
        Room[8] = new RoomInformation("1#302", "20213021", "", "", "", 40);
        Room[9] = new RoomInformation("1#303", "20213031", "", "", "", 30);
        while (true) {
            System.out.print("***********************************************************\r\n"
                    + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                    + "***********************************************************\r\n"
                    + "                      1、宿舍查询\r\n" + "                      2、安排新宿舍\r\n"
                    + "                      3、调整宿舍\r\n" + "                      4、宿舍卫生评价\r\n"
                    + "                      5、卫生检查情况查询\r\n"
                    + "**********************************************************\r\n");
            System.out.print("请选择:");
            int a = sc.nextInt();
            if (a == 1) {
                chaxun();
            } else if (a == 2) {
                anpaixinsushe();
            } else if (a == 3) {
                tiaozheng();
            } else if (a == 4) {
                weishengpingjia();
            } else if (a == 5) {
                weichengchaxun();
            } else {
                System.out.println("该选项不存在");
            }
        }
    }

    public static void chaxun() {
        System.out.print("***********************************************************\r\n"
                + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                + "***********************************************************\r\n"
                + "                        宿舍详细信息列表\r\n");
        for (int i = 0; i < 10; i++) {
            int num = i + 1;
            int people = 4;
            System.out.print("               " + num + "、" + Room[i].getRoomno() + "\t");
            if (Room[i].getStunno1() == "")
                people--;
            if (Room[i].getStunno2() == "")
                people--;
            if (Room[i].getStunno3() == "")
                people--;
            if (Room[i].getStunno4() == "")
                people--;
            System.out.print(people + "人\t");
            if (people == 4)
                System.out.print("已满\n");
            else if (people == 3)
                System.out.print("空1人\n");
            else if (people == 2)
                System.out.print("空2人\n");
            else if (people == 1)
                System.out.print("空3人\n");
            else if (people == 0)
                System.out.print("空宿舍\n");

        }
        System.out.print("***********************************************************\r\n");

    }

    public static void anpaixinsushe() {
        System.out.print("***********************************************************\r\n"
                + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                + "                          安排新宿舍\r\n"
                + "***********************************************************\r\n"
                + "                      空宿舍详细信息列表\r\n");
        int num = 1;
        for (int i = 0; i < 10; i++) {

            int people = 4;
            if (Room[i].getStunno1() == "")
                people--;
            if (Room[i].getStunno2() == "")
                people--;
            if (Room[i].getStunno3() == "")
                people--;
            if (Room[i].getStunno4() == "")
                people--;
            if (people != 0)
                continue;
            System.out.print("               " + num + "、" + Room[i].getRoomno() + "\t");

            System.out.print(people + "人\t");
            if (people == 4)
                System.out.print("已满\n");
            else if (people == 3)
                System.out.print("空1人\n");
            else if (people == 2)
                System.out.print("空2人\n");
            else if (people == 1)
                System.out.print("空3人\n");
            else if (people == 0)
                System.out.print("空宿舍\n");
            num++;
        }
        System.out.print("              请输入新宿舍号:");
        String str = sc.next();
        System.out.print("***********************************************************\r\n");
        int newNum = -1;
        for (int i = 0; i < 10; i++) {
            if (Room[i].getRoomno().equals(str))
                newNum = i;
        }
        if (newNum == -1) {
            System.out.println("宿舍不存在");
            String[] ma = null;
            main(ma);
        }
        if (!(Room[newNum].getStunno1().equals("") && Room[newNum].getStunno2().equals("")
                && Room[newNum].getStunno3().equals("") && Room[newNum].getStunno4().equals("")))
            System.out.println("该宿舍不是空宿舍,无法安排新生");
        else {
            while (true) {
                System.out.print("***********************************************************\r\n"
                        + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                        + "                          安排新宿舍\r\n"
                        + "***********************************************************\r\n"
                        + "                     新宿舍号:" + str + "\r\n");
                String s1, s2, s3, s4;
                int YorN = 1;
                if (Room[newNum].getStunno1().equals("")) {
                    System.out.print("               1、床位1:" + Room[newNum].getStunno1());
                    s1 = sc.next();
                    if (s1.equals("END"))
                        break;
                    for (int i = 0; i < 10; i++) {
                        if (Room[i].getStunno1().equals(s1) || Room[i].getStunno2().equals(s1)
                                || Room[i].getStunno3().equals(s1) || Room[i].getStunno4().equals(s1))
                            YorN = 0;
                    }
                    if (YorN == 0) {
                        System.out.println("该学生已分配宿舍");
                        continue;
                    }
                    Room[newNum].setStunno1(s1);
                }
                if (Room[newNum].getStunno2().equals("")) {
                    System.out.print("               2、床位2:" + Room[newNum].getStunno2());
                    s2 = sc.next();
                    if (s2.equals("END"))
                        break;
                    for (int i = 0; i < 10; i++) {
                        if (Room[i].getStunno1().equals(s2) || Room[i].getStunno2().equals(s2)
                                || Room[i].getStunno3().equals(s2) || Room[i].getStunno4().equals(s2))
                            YorN = 0;
                    }
                    if (YorN == 0) {
                        System.out.println("该学生已分配宿舍");
                        continue;
                    }
                    Room[newNum].setStunno2(s2);
                }
                if (Room[newNum].getStunno3().equals("")) {
                    System.out.print("               3、床位3:" + Room[newNum].getStunno3());
                    s3 = sc.next();
                    if (s3.equals("END"))
                        break;
                    for (int i = 0; i < 10; i++) {
                        if (Room[i].getStunno1().equals(s3) || Room[i].getStunno2().equals(s3)
                                || Room[i].getStunno3().equals(s3) || Room[i].getStunno4().equals(s3))
                            YorN = 0;
                    }
                    if (YorN == 0) {
                        System.out.println("该学生已分配宿舍");
                        continue;
                    }
                    Room[newNum].setStunno3(s3);
                }
                System.out.print("               4、床位4:" + Room[newNum].getStunno4());
                s4 = sc.next();
                if (s4.equals("END"))
                    break;
                for (int i = 0; i < 10; i++) {
                    if (Room[i].getStunno1().equals(s4) || Room[i].getStunno2().equals(s4)
                            || Room[i].getStunno3().equals(s4) || Room[i].getStunno4().equals(s4))
                        YorN = 0;
                }
                if (YorN == 0) {
                    System.out.println("该学生已分配宿舍");
                    continue;
                } else {
                    Room[newNum].setStunno4(s4);
                    System.out.println("该宿舍已满");
                    break;
                }

            }
        }
    }

    public static void tiaozheng() {
        System.out.print("***********************************************************\r\n"
                + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                + "                          调整宿舍\r\n"
                + "***********************************************************\r\n"
                + "                   有空床位宿舍详细信息列表\r\n");
        int num = 1;
        for (int i = 0; i < 10; i++) {

            int people = 4;
            if (Room[i].getStunno1() == "")
                people--;
            if (Room[i].getStunno2() == "")
                people--;
            if (Room[i].getStunno3() == "")
                people--;
            if (Room[i].getStunno4() == "")
                people--;
            if (people == 4)
                continue;
            System.out.print("               " + num + "、" + Room[i].getRoomno() + "\t");

            System.out.print(people + "人\t");
            if (people == 4)
                System.out.print("已满\n");
            else if (people == 3)
                System.out.print("空1人\n");
            else if (people == 2)
                System.out.print("空2人\n");
            else if (people == 1)
                System.out.print("空3人\n");
            else if (people == 0)
                System.out.print("空宿舍\n");
            num++;
        }
        System.out.print("          请输入待调整宿舍号:");
        String str = sc.next();
        System.out.print("***********************************************************\r\n");
        int newNum = -1;
        for (int i = 0; i < 10; i++) {
            if (Room[i].getRoomno().equals(str))
                newNum = i;
        }
        if (newNum == -1) {
            System.out.println("宿舍不存在");
            String[] ma = null;
            main(ma);
        }
        if (!(Room[newNum].getStunno1().equals("") || Room[newNum].getStunno2().equals("")
                || Room[newNum].getStunno3().equals("") || Room[newNum].getStunno4().equals("")))
            System.out.println("该宿舍不是空宿舍,无法安排新生");
        else {
            while (true) {
                System.out.print("***********************************************************\r\n"
                        + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                        + "                          调整宿舍\r\n"
                        + "***********************************************************\r\n"
                        + "                  待调整宿舍号:" + str + "\r\n");
                String s1, s2, s3, s4;
                int YorN = 1;
                int number = 1;
                if (Room[newNum].getStunno1().equals("")) {
                    System.out.print("               " + number + "、床位1:" + Room[newNum].getStunno1());
                    s1 = sc.next();
                    if (s1.equals("END"))
                        break;
                    for (int i = 0; i < 10; i++) {
                        if (Room[i].getStunno1().equals(s1) || Room[i].getStunno2().equals(s1)
                                || Room[i].getStunno3().equals(s1) || Room[i].getStunno4().equals(s1))
                            YorN = 0;
                    }
                    if (YorN == 0) {
                        System.out.println("该学生已分配宿舍");
                        continue;
                    }
                    Room[newNum].setStunno1(s1);
                    number++;
                }
                if (Room[newNum].getStunno2().equals("")) {
                    System.out.print("               " + number + "、床位2:" + Room[newNum].getStunno2());
                    s2 = sc.next();
                    if (s2.equals("END"))
                        break;
                    for (int i = 0; i < 10; i++) {
                        if (Room[i].getStunno1().equals(s2) || Room[i].getStunno2().equals(s2)
                                || Room[i].getStunno3().equals(s2) || Room[i].getStunno4().equals(s2))
                            YorN = 0;
                    }
                    if (YorN == 0) {
                        System.out.println("该学生已分配宿舍");
                        continue;
                    }
                    Room[newNum].setStunno2(s2);
                    number++;
                }
                if (Room[newNum].getStunno3().equals("")) {
                    System.out.print("               " + number + "、床位3:" + Room[newNum].getStunno3());
                    s3 = sc.next();
                    if (s3.equals("END"))
                        break;
                    for (int i = 0; i < 10; i++) {
                        if (Room[i].getStunno1().equals(s3) || Room[i].getStunno2().equals(s3)
                                || Room[i].getStunno3().equals(s3) || Room[i].getStunno4().equals(s3))
                            YorN = 0;
                    }
                    if (YorN == 0) {
                        System.out.println("该学生已分配宿舍");
                        continue;
                    }
                    Room[newNum].setStunno3(s3);
                    number++;
                }
                System.out.print("               " + number + "、床位4:" + Room[newNum].getStunno4());
                s4 = sc.next();
                if (s4.equals("END"))
                    break;
                for (int i = 0; i < 10; i++) {
                    if (Room[i].getStunno1().equals(s4) || Room[i].getStunno2().equals(s4)
                            || Room[i].getStunno3().equals(s4) || Room[i].getStunno4().equals(s4))
                        YorN = 0;
                }
                if (YorN == 0) {
                    System.out.println("该学生已分配宿舍");
                    continue;
                } else {
                    Room[newNum].setStunno4(s4);
                    System.out.println("该宿舍已满");
                    break;
                }

            }
        }
    }

    public static void weishengpingjia() {
        while (true) {
            System.out.print("***********************************************************\r\n"
                    + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                    + "                          宿舍卫生评价\r\n"
                    + "***********************************************************\r\n" + "                请输入待评价宿舍号:");
            String str = sc.next();
            System.out.print("***********************************************************\r\n");
            int newNum = -1;
            for (int i = 0; i < 10; i++) {
                if (Room[i].getRoomno().equals(str))
                    newNum = i;
            }
            if (newNum == -1) {
                System.out.println("宿舍不存在");
                String[] ma = null;
                main(ma);
            }
            int people = 4;
            if (Room[newNum].getStunno1() == "")
                people--;
            if (Room[newNum].getStunno2() == "")
                people--;
            if (Room[newNum].getStunno3() == "")
                people--;
            if (Room[newNum].getStunno4() == "")
                people--;
            if (people == 0) {
                System.out.print("该宿舍为空宿舍");
                continue;

            } else {
                while (true) {
                    System.out.print("***********************************************************\r\n"
                            + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                            + "                        宿舍卫生评价\r\n"
                            + "***********************************************************\r\n"
                            + "                    宿舍号:" + str + "\r\n");
                    int number = 1;
                    if (!(Room[newNum].getStunno1().equals(""))) {
                        System.out.println("               " + number + "、床位1:" + Room[newNum].getStunno1());
                        number++;
                    }
                    if (!(Room[newNum].getStunno2().equals(""))) {
                        System.out.println("               " + number + "、床位2:" + Room[newNum].getStunno2());
                        number++;
                    }
                    if (!(Room[newNum].getStunno3().equals(""))) {
                        System.out.println("               " + number + "、床位3:" + Room[newNum].getStunno3());
                        number++;
                    }
                    if (!(Room[newNum].getStunno4().equals(""))) {
                        System.out.println("               " + number + "、床位4:" + Room[newNum].getStunno4());
                    }
                    System.out.print("输入宿舍卫生评价分数:");
                    int a = sc.nextInt();
                    System.out.print("***********************************************************\r\n");
                    if (a >= 0 && a <= 100) {
                        break;
                    } else {
                        System.out.println("输入错误");
                    }
                }
            }
        }
    }

    public static void weichengchaxun() {
        System.out.print("***********************************************************\r\n"
                + "                        石家庄铁道大学\r\n" + "                     学生公寓管理系统v2022\r\n"
                + "***********************************************************\r\n"
                + "                        卫生检查情况查询\r\n");
        for (int i = 0; i < 10; i++) {
            int num = i + 1;
            System.out.print("               " + num + "、" + Room[i].getRoomno() + "\t");
            System.out.print(Room[i].getHygienescore() + "\t");
            if (Room[i].getHygienescore() >= 90)
                System.out.println("优秀");
            else if (Room[i].getHygienescore() >= 80)
                System.out.println("良好");
            else if (Room[i].getHygienescore() >= 60)
                System.out.println("合格");
            else
                System.out.println("不合格");

        }
        System.out.print("***********************************************************\r\n");

    }

}