大学java真题

公共课地制{

私弦果甲;

私弦生粉;

私弦诗仙;

私串街道;

私串门牌;

私弦丹薇;

私弦幽边;

//显示方法

公共void show(){

string buffer sb = new string buffer();

sb . append(this . guojia+" \ t ");

sb . append(this . sheng fen+" \ t ");

sb . append(this . shixian+" \ t ");

sb . append(this . jiedao+" \ t ");

sb . append(this . menpai+" \ t ");

sb . append(this . danwei+" \ t ");

sb . append(this . you bian+" \ t ");

System.out.println(新字符串(sb));

}

公共字符串getDanwei() {

回报丹薇;

}

public void setDanwei(字符串danwei) {

this.danwei = danwei

}

公共字符串getGuojia() {

还郭嘉;

}

public void setGuojia(字符串guojia) {

this.guojia = guojia

}

公共字符串getJiedao() {

返回街道;

}

public void set Jie Dao(String Jie Dao){

this.jiedao = jiedao

}

公共字符串getMenpai() {

返回门牌;

}

public void setMenpai(String menpai){

this.menpai = menpai

}

公共字符串getShengfen() {

回归圣粉;

}

public void set shengfen(String shengfen){

this . sheng fen = sheng fen;

}

公共字符串getShixian() {

回报世贤;

}

public void setShixian(字符串shixian) {

this.shixian = shixian

}

公共字符串getYoubian() {

退尤边;

}

public void setYoubian(字符串youbian) {

this . you bian = you bian;

}

}

公共类测试{

/**

* @param args

*/

公共静态void main(String[] args) {

// TODO自动生成的方法存根

Dizhi Dizhi = new Dizhi();

Dizhi.setGuojia("中国");

Dizhi.setShengfen(《山东》);

Dizhi.setShixian(《济南》);

Dizhi.setJiedao("吉大路");

迪志。setmenpai(“23号”);

Dizhi.setDanwei(“暨南大学”);

dizhi . setyoubian(" 250001 ");

dizhi . show();

}

}