Skip to content

Instantly share code, notes, and snippets.

@kendhia
Created April 4, 2017 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kendhia/6a1aff78be13079847c4fd1a23472266 to your computer and use it in GitHub Desktop.
Save kendhia/6a1aff78be13079847c4fd1a23472266 to your computer and use it in GitHub Desktop.
package project1;
public class InternationalCustomer extends Customer {
private String Country;
private String City;
public InternationalCustomer(){
}
public InternationalCustomer(int CustomerID, String Name, String Surname,
String Country, String City) {
super(CustomerID, Name, Surname);
this.Country = Country;
this.City = City;
}
public InternationalCustomer(InternationalCustomer ic){
this(ic.getCustomerID(), ic.getName(), ic.getSurname(), ic.getCountry(),
ic.getCity());
}
@Override
public String toString() {
return "InternationalCustomer: " + super.toString() + "Country: " + Country + ", City: " + City + '.';
}
public String getCountry() {
return Country;
}
public void setCountry(String Country) {
this.Country = Country;
}
public String getCity() {
return City;
}
public void setCity(String City) {
this.City = City;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment