package FeiGe;
public class Customer extends Person{
private String customerId;
private String phone;
public Customer(){
}
public Customer (String CustomerId , String phone){
super() ; //調(diào)用父類構(gòu)造方法檐什, 可寫可不寫
this.customerId = customerId;
this.phone = phone;
}
public Customer(String name , String sex , String pwd , int age , String customerId , String phone){
super( name , sex , pwd , age);
this.customerId = customerId;
this.phone = phone;
}
public String getCustomerId(){
return customerId;
}
public void setCustomerId(String customerId){
this.customerId = customerId;
}
public String getPhone(){
return phone;
}
@Override
public String toString() {
return "Customer{" +
"customerId='" + customerId + '\'' +
", phone='" + phone + '\'' +
'}';
}
public void setPhone(String phone){
this.phone = phone;
}
}
package FeiGe;
public class Courier extends Person{
private String courierId;
// getter & setter
// Constructor 構(gòu)造方法
public String getCourierId() {
return courierId;
}
public void setCourierId(String courierId) {
this.courierId = courierId;
}
// toString
@Override
public String toString() {
return "Courier{" +
"courierId='" + courierId + '\'' +
'}';
}
}