当前位置:   article > 正文

20231125 1+X 中级实操考试(id:3777)_20231125 1+x 中级实操考试(id:3777)

20231125 1+x 中级实操考试(id:3777)

  1. //补充完成该类的含参构造方法
  2. public Info(String name, int age, String sex, String phone) {
  3. this.name = name;
  4. this.age = age;
  5. this.sex = sex;
  6. this.phone = phone;
  7. }

  1. // 请修改该方法,以保证打印对象时输出格式如下:
  2. // [name='zs';age=20;sex='男';phone='18812349876']
  3. @Override
  4. public String toString() {
  5. return "[name='"+this.name+"';age="+this.age+";sex='"+this.sex+"';phone='"+this.phone+"']";
  6. }

    // 请补全以下方法,要求评分的范围在

    // 1<=score<=100 之间且为偶数

    // 当参数在规定范围外时,不做任何动作

    public void setScore(int score) {

        // 缺失代码:

        if(1<=score||score<=100){

            this.score = score;

        }

    }

select * from info where name=?

select * from info where sex=?

select * from account order by score desc limit 1

select * from account order by money desc limit 1

update info set age=case when sex='男' then age+1 else age+2 end

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/804002
推荐阅读
相关标签
  

闽ICP备14008679号