创建⼀个学⽣类,⾥⾯有如下属性:
1. ⽣⽇BirthDays类⾥⾯的属性有year int, month int, day int
2. Student 类:sid int, name String, sex boolean, score double, tel String,BirthDay birth
3. 使⽤⽆参构造器和property给对象赋值
4. 使⽤带参构造器给对象赋值(四种⽅式都均使⽤)
5. 使⽤namespace命名空间p给对象学⽣赋值
创建Student 类
public class Student {
private int sid;
private String name;
private boolean sex;
private double score;
private String tel;
private BirthDays birth;
public Student() {
}
public Student(int sid, String name, boolean sex, double score, String tel, BirthDays birth) {
this.sid = sid;
this.name = name;
this.sex = sex;
this.score = score;
this.tel = tel;
this.birth = birth;
}
public int getSid() {
return sid;
}
public void setSid(int sid) {
this.sid = sid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isSex() {
return sex;
}
public void setSex(boolean sex) {
this.sex = sex;
}
public double getScore() {
return score;
}
public void setScore(double score) {
this.score = score;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public BirthDays getBirth() {
return birth;
}
public void setBirth(BirthDays birth) {
this.birth = birth;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("Student{");
sb.append("sid=").append(sid);
sb.append(", name='").append(name).append('\'');
sb.append(", sex=").append(sex ? "男":"女");
sb.append(", score=").append(score);
sb.append(", tel='").append(tel).append('\'');
sb.append(", birth=").append(birth);
sb.append('}');
return sb.toString();
}
}
创建BirthDays类
public class BirthDays {
private int year;
private int month;
private int day;
public BirthDays() {
}
public BirthDays(int year, int month, int day) {
this.year = year;
this.month = month;
this.day = day;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
public int getMonth() {
return month;
}
public void setMonth(int month) {
this.month = month;
}
public int getDay() {
return day;
}
public void setDay(int day) {
this.day = day;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("BirthDays{");
sb.append("year=").append(year);
sb.append(", month=").append(month);
sb.append(", day=").append(day);
sb.append('}');
return sb.toString();
}
}
ArcgisEngine实现对地图的放大、缩小和平移:
个人觉得是平移,不过网上的都是漫游,通俗的说就是把一个地图对象从一边拉到另一边而已。就看人说话吧.
具体实现:
一、引入命名空间
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Controls;
二、代码实现.
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of th