//补充完成该类的含参构造方法
public Info(String name, int age, String sex, String phone) {
this.name = name;
this.age = age;
this.sex = sex;
this.phone = phone;
}
// 请修改该方法,以保证打印对象时输出格式如下:
// [name='zs';age=20;sex='男';phone='18812349876']
@Override
public String toString() {
return "[name='"+this.name+"';age="+this.age+";sex='"+this.sex+"';phone='"+this.phone+"']";
}
// 请补全以下方法,要求评分的范围在
// 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