Created
April 4, 2017 18:37
-
-
Save kendhia/8229539258a0198ad25a294775203e92 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 NationalCustomer extends Customer{ | |
private int LicensePlateNumber; | |
private String Occupation; | |
public NationalCustomer() { | |
this(0, null, null, 0, null); | |
} | |
public NationalCustomer(int CustomerId, String Name, String SurName, | |
int LicensePlateNamber, String Occupation) { | |
super(CustomerId, Name, SurName); | |
this.LicensePlateNumber = LicensePlateNamber; | |
this.Occupation = Occupation; | |
} | |
public NationalCustomer(NationalCustomer nationalCustomer) { | |
this(nationalCustomer.getCustomerID(), nationalCustomer.getName(), nationalCustomer.getSurname(), | |
nationalCustomer.getLicensePlateNumber(), nationalCustomer.getOccupation()); | |
} | |
@Override | |
public String toString() { | |
return "NationalCustomer: " + super.toString() + "LicensePlateNumber: " + LicensePlateNumber + ", Occupation: " + Occupation + '.'; | |
} | |
public int getLicensePlateNumber() { | |
return LicensePlateNumber; | |
} | |
public void setLicensePlateNumber(int LicensePlateNumber) { | |
this.LicensePlateNumber = LicensePlateNumber; | |
} | |
public String getOccupation() { | |
return Occupation; | |
} | |
public void setOccupation(String Occupation) { | |
this.Occupation = Occupation; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment