Created
April 4, 2017 18:36
-
-
Save kendhia/6a1aff78be13079847c4fd1a23472266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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