Answer:
Java.
Explanation:
public class Address {
int houseNumber;
String street;
int apartmentNumber;
String city;
String state;
int postalCode;
public Address(int houseNumber, String street, String city, String state, int postalCode) {
this.houseNumber = houseNumber;
this.street = street;
this.city = city;
this.state = state;
this.postalCode = postalCode;
}
public Address(int houseNumber, String street, int apartmentNumber, String city, String state, int postalCode) {
this(houseNumber, street, city, state, postalCode);
this.apartmentNumber = apartmentNumber;
}
public void printAddress() {
System.out.printf("Street: %s%n", this.street);
System.out.printf("City: %s, State: %s, Postal Code: %d.%n", this.city, this.state, this.postalCode);
}
public boolean comesBefore(Address other) {
if (this.postalCode < other.postalCode) {
return true;
}
else {
return false;
}
}
}
The few changes I made are in bold.