@songlaf
2018-05-17T03:00:15.000000Z
字数 805
阅读 494
注:代码可以用C#或者Java来实现
1)找出用户数超过50的城市
2)找出年龄在20,到60之间的用户的姓名。
id(编号) | name(姓名) | city(城市) | age(年龄) |
---|---|---|---|
1 | 张三 | 南京 | 90 |
2 | 李四 | 上海 | 100 |
3 | 王五 | 北京 | 90 |
... | ... | ... | ... |
function Company(id,name) {
flag = 100;
this.name = name;
this.Department = [
{ID:1,Name:"软件部"},
{ID:1,Name:"市场部"},
];
this.showDepartment = function () {
$.each(this.Department,function (i,v) {
console.log("公司名称"+this.name);
console.log(v);
console.log(v.Name);
});
};
};
var company = new Company(100,"智远弘业");
company.showDepartment();
public class Person
{
public int id { get; set; }
public virtual string getMessage() {
return this.id.ToString();
}
}
public class Employee:Person
{
public string UserName { get; set; }
public virtual string getMessage()
{
return String.Format("{0},{1}", this.id,this.UserName);
}
}