Hummmer 2019-01-05 22:51 采纳率: 100%
浏览 4220
已采纳

新手求助 请问Java编译提示错误找不到符号是因为什么呀?

package com.sample;

private String Name;
private String Age;
private String Sex;
private String IsPartyMember;
private String Position;
private String School;
private String Cclass;
private String TeachingWay;



 //设置名字
    public void setName(String newValue){
        this.Name = newValue;   
      }

    //输出名字
    public String getName(){
        return Name;   
      }

    //设置年龄
    public void setAge(String newValue){
        this.Age = newValue;
    }

    //输出年龄
    public String getAge(){
        return Age;
    }

    //设置性别
    public void setSex(String newValue){
        this.Sex = newValue;
    }

    //输出性别
    public String getSex(){
        if(Sex.equals("man")==true) 
            return "男";
        else
            return "女";
    }


    //设置是否是党员
    public void setIsPartyMember(String newValue){
        this.IsPartyMember = newValue;
    }

    //输出是否是党员
    public String getIsPartyMember(){
        if(IsPartyMember.equals("yes")==true)
            return "是";
        else
            return "否";
    }


     //设置职称
     public void setPosition(String newValue){
         this.Position=newValue;
                  }
     //输出职称
       public string getPosition(){
              if(Position.equals("01")==true)
                     return "助教";
              if(Position.equals("02")==true)
                     return "讲师";
              if(Position.equals("03")==true)
                     return "副教授";
              if(Position.equals("04")==true)
                     return "教授";
                     }
                     //设置院系
      public String setSchool(String newValue){
              this.School=newValue;
                    }
                     //输出院系
    public String getSchool(){
        if(School.equals("001")==true)
            return "软件学院";
        if(School.equals("002")==true)
            return "文学与新闻传播学院";
        if(School.equals("003")==true)
            return "外国语学院";
        if(School.equals("004")==true)
            return "建筑与艺术学院";
        if(School.equals("005")==true)
            return "商学院";
        if(School.equals("006")==true)
            return "法学院";
        if(School.equals("007")==true)
            return "数学与统计学院";
        if(School.equals("008")==true)
            return " 机电工程学院";
        if(School.equals("009")==true)
            return "药学院";
        if(School.equals("010")==true)
            return "航空航天学院";
        if(School.equals("011")==true)
            return "交通运输工程学院";
        if(School.equals("012")==true)
            return "土木工程学院";
        if(School.equals("013")==true)
            return "基础医学院";
        if(School.equals("014")==true)
            return "生命科学学院";
        if(School.equals("015")==true)
            return "材料科学与工程学院";
        if(School.equals("016")==true)
            return "中南大学公共管理学院";
        if(School.equals("017")==true)
            return "马克思主义学院 ";
        if(School.equals("018")==true)
            return "粉末冶金研究院";
        if(School.equals("019")==true)
            return "化学化工学院";

        else
            return "地球科学与信息物理学院";
    }



                  //设置班级
    public void setCclass(String newValue){
        this.Cclass = newValue;
    }

    //输出班级
    public String getCclass(){    
         return Cclass;
    }

    //设置上课方法             
               public String setTeachingWay(string newValue){
                          this.TeachingWay=newValue;
               }
               //输出上课方法
               public String getTeachingWay(){
                           return TeachingWay;
                }

};

图片说明


  • 写回答

3条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 ROS中的TEB局部规划问题
      • ¥20 关于#matlab#的问题:要求测出上面图片中所有同心圆的半径
      • ¥20 epanet软件运行问题
      • ¥15 Python 文件读取
      • ¥60 dpabi进行Alff计算时脑池有干扰信号
      • ¥15 利用kmeans或kshape聚类分析对归一化的无量纲时间-降雨序列进行聚类
      • ¥15 protel99.SE提示一下弹窗
      • ¥15 银河麒麟v10 执行.run失败如何解决
      • ¥15 如何用Python打开LA文件
      • ¥15 用mysql做一个酒店管理系统