當前位置:編程學習大全網 - 源碼下載 - java小型通訊錄源代碼

java小型通訊錄源代碼

package src;

public class TelBook {

// 姓名

String name;

// 家庭電話

Integer homePhone;

// 個人移動電話

Integer personalMobilePhone;

// 辦公電話

Integer officePhone;

// 家庭地址

String homeAddress;

// 辦公地址

String officeAddress;

// QQ號碼

Integer qqNumber;

// MSN號碼

String msn;

// 郵件

String email;

// 備註

String notes;

String getEmail() {

return email;

}

void setEmail(String email) {

this.email = email;

}

String getHomeAddress() {

return homeAddress;

}

void setHomeAddress(String homeAddress) {

this.homeAddress = homeAddress;

}

Integer getHomePhone() {

return homePhone;

}

void setHomePhone(Integer homePhone) {

this.homePhone = homePhone;

}

String getMsn() {

return msn;

}

void setMsn(String msn) {

this.msn = msn;

}

String getName() {

return name;

}

void setName(String name) {

this.name = name;

}

String getNotes() {

return notes;

}

void setNotes(String notes) {

this.notes = notes;

}

String getOfficeAddress() {

return officeAddress;

}

void setOfficeAddress(String officeAddress) {

this.officeAddress = officeAddress;

}

Integer getOfficePhone() {

return officePhone;

}

void setOfficePhone(Integer officePhone) {

this.officePhone = officePhone;

}

Integer getPersonalMobilePhone() {

return personalMobilePhone;

}

void setPersonalMobilePhone(Integer personalMobilePhone) {

this.personalMobilePhone = personalMobilePhone;

}

Integer getQqNumber() {

return qqNumber;

}

void setQqNumber(Integer qqNumber) {

this.qqNumber = qqNumber;

}

public TelBook() {

}

public TelBook(String name, Integer personalMobilePhone) {

this.setName(name);

this.setPersonalMobilePhone(personalMobilePhone);

}

/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

TelBook myfriend = new TelBook("張三", new Integer("13800138000"));

}

}

  • 上一篇:市盈率ttm是什麽意思(股票市盈率TTM是什麽意思)
  • 下一篇:OpenCL,OpenGL和DirectX三者的區別
  • copyright 2024編程學習大全網