¥class
BusinessEntry extends NonResidentialEntry {
¥ BusinessEntry(String n, String a,
String p, String c, String s) { super(n,a,p,c,s); }
¥ public String toString() {
¥ return
"Business[" + this.getName() + "," + this.getAddress() +
"," +
¥ this.getPhone()
+ "," + this.getCity() + "," + this.getState() +
"]";
¥ }
¥}
¥class
GovernmentEntry extends CityEntry {
¥ String government;
¥ GovernmentEntry(String n, String a,
String p, String c, String s, String g) {
¥ super(n,a,p,c,s);
¥ this.government = g;
¥ }
¥ String getGovernment() { return this.government; }
¥ public String toString() {
¥ return "Government[" + this.getName() +
"," + this.getAddress() + "," + this.getPhone() +
¥ "," +
this.getCity() + "," + this.getState() + "," +
this.getGovernment() + "]";
¥ }
¥}
¥class
Residential Entry extends CityEntry {
¥ ResidentialEntry(String n, String a,
String p) { super(n,a,p); }
¥ public String toString() {
¥ return "Residential[" + this.name +
"," + this.address + "," + this.phone + "]";
¥ }
¥}
¥